Note
This feature requires additional activation steps. To learn more about this feature and activating it for your program, contact your Marqeta representative.
This feature requires additional activation steps. To learn more about this feature and activating it for your program, contact your Marqeta representative.
Transaction process
An authorization request is a type of purchase transaction that occurs when a cardholder makes a purchase. The process for using a Program Gateway to approve or deny an authorization request involves a series of steps performed by the card network, Marqeta’s credit platform, and you.
Marqeta’s credit platform performs checks on program, authorization, and velocity controls, and the account’s available credit, to validate the authorization.
If the authorization is valid, Marqeta’s credit platform sends a Gateway request to your Program Gateway endpoint.
Your Program Gateway returns a Gateway response to Marqeta’s credit platform either approving or declining the transaction authorization.
If the authorization is approved, the Marqeta platform returns a response to the card network and sends the transaction to your webhook endpoint for validation.
Configuring a Program Gateway
You must configure a Program Gateway for your credit program to exchange messages with Marqeta’s credit platform, which enables you to approve or decline a transaction authorization request. A Program Gateway is an endpoint hosted in your environment that is configured to receive messages sent by Marqeta’s credit platform. To create a Program Gateway, send aPOST request to the /credit/programgateways endpoint. For the endpoint reference, see Create Program Gateway.
Gateway requests
A Gateway request is an actionable message sent by the Marqeta platform to your Program Gateway that requests permission to approve a specific transaction authorization. Because all Gateway requests are actionable, you must evaluate the request body in each message and respond.Transaction events
To use your Program Gateway, your gateway endpoint must be set up to listen for and process the following transaction event types:-
pgfs.authorization -
pgfs.authorization.incremental -
pgfs.original.credit.authorization -
pgfs.original.credit.auth_plus_capture -
pgfs.refund.authorization
Request body
A Gateway request body contains transaction data such as the transaction amount, associateduser_token (embedded in the jit_funding object), MID, MCC, and more.
Note
The Program Gateway for credit programs is a similar concept to JIT Funding for debit programs and uses the
The Program Gateway for credit programs is a similar concept to JIT Funding for debit programs and uses the
jit_funding object. For more, see The jit_funding object.JSON
Gateway responses
A Gateway response is a message sent by your Program Gateway to Marqeta’s credit platform that approves or declines the transaction authorization sent in the Gateway request.Approval and decline codes
Use standard HTTP response codes to approve or decline Gateway requests.| Decision | Response code |
|---|---|
| Approve | 200 OK |
| Decline | 402 Request Failed |
Response body
In the Gateway response body, you must include the originaljit_funding object from the Gateway request, regardless of whether you approved or declined the transaction authorization.
Response time limit
You are given 2000 milliseconds to evaluate and respond to each Gateway request, otherwise the transaction is automatically approved. Marqeta’s credit platform sends the approval to the card network, which completes the transaction authorization.Decline reasons
If you decline the transaction authorization, you can include a decline reason in your Gateway response. In addition, you can inject custom metadata into each response. Messages sent to the Marqeta platform must use the HTTPS protocol. Possible decline reasons:-
DUPLICATE_TRANSACTION -
INVALID_AMOUNT -
INVALID_CARD -
INVALID_MERCHANT -
REVOCATION_AUTHORIZATION_ORDER -
REVOCATION_ALL_AUTHORIZATION_ORDER -
SOFT_DECLINE_AUTHENTICATION_REQUIRED -
STOP_PAYMENT -
SUSPECTED_FRAUD -
TRANSACTION_COUNT_LIMIT_EXCEEDED -
TRANSACTION_NOT_PERMITTED
Decision outcomes
The following are the possible scenarios and outcomes for transaction authorization decisions. Note that Commando Mode cannot be used.| Marqeta decision | Program Gateway decision | Final decision |
|---|---|---|
| Approve | Approve | Approve |
| Approve | Decline | Decline |
| Approve | Missed response Any non-402 response | Approve |
Webhook event notifications
Marqeta sends webhook notifications of the transaction authorizations that you approved or declined to your webhook endpoint. You must have already configured a webhook to capturecredit.* events. Receiving these webhooks is confirmation that these transaction authorizations made an appropriate impact on the account ledger.
For more on events, see Credit journal entry events. For more on subscribing to webhook notifications, see the About Webhooks tutorial.