cardCapabilities.supportsSpendLimitsAtIssuance is true.
It never loosens Grid’s own checks.
How it works
- A cardholder uses the card, and the card network asks Grid to authorize it.
- Grid runs its checks: card status, card and platform spend limits, merchant category rules, and network support. If any check declines, Grid declines the authorization and does not call your endpoint.
- Grid sends your endpoint a signed
CARD_AUTHORIZATION.REQUEST. - Your endpoint returns
APPROVEorDECLINEwithin 1.5 seconds. - If you approve, Grid reserves the amount from the funding source. If the
funding source cannot cover it, Grid declines with
INSUFFICIENT_FUNDS. - Grid sends the final outcome to your
webhookEndpointasCARD_TRANSACTION.AUTHORIZEDorCARD_TRANSACTION.DECLINED.
Enroll your endpoint
Enroll an HTTPS endpoint withPUT /platform/card-authorization-endpoint. It
can differ from your webhookEndpoint, and hosting it separately keeps a slow
webhook handler from delaying card decisions.
cURL
data.isTest: true and example data that matches no real card. Return 200
with any valid decision without looking up the card or recording the
request. Enrollment succeeds only if your endpoint returns a valid response
in time, so a broken endpoint never starts declining real authorizations.
The endpoint has its own resource, outside PATCH /platform/config, because
enrolling calls your endpoint and can fail on that call alone.
To stop, call DELETE /platform/card-authorization-endpoint. Grid’s own checks
then decide every authorization. GET returns 404 while no endpoint is
enrolled.
Test in sandbox
In sandbox, an enrolled endpoint receives the requests that thePOST /sandbox/cards/{id}/simulate/authorization simulator produces, as long
as Grid’s own checks approve them. To test timeoutBehavior, have your
endpoint return a non-200 status or wait past responseTimeoutMs.
Respond to requests
Each request uses the standard webhook envelope and carries the authorization indata:
X-Grid-Signature header as you do for other webhooks, and reject
requests whose timestamp is more than a few minutes old. Then return HTTP
200 with your decision:
declineReason to the card network, so choose the most specific
one:
A decline you return reaches your
webhookEndpoint as
CARD_TRANSACTION.DECLINED with cardDeclinedReason: PLATFORM_DECLINED and
your declineReason in platformDeclineReason.
approvedAmount is the amount Grid authorizes if you approve. It becomes
authorizedAmount on the resulting CardTransaction.
Timeouts and errors
Respond within the endpoint’sresponseTimeoutMs, which is 1.5 seconds. The
card network holds the cardholder at the terminal while Grid waits, so keep
the decision path fast and avoid calls to slow dependencies.
If your endpoint times out, returns a status other than 200, or returns an
invalid body, Grid applies the timeoutBehavior you set at enrollment:
Grid does not retry an authorization request.
Duplicate requests
The card network can retry an authorization, so your endpoint can receive the same authorization more than once. Each delivery has a newid, but
data.transactionId and data.issuerTransactionToken stay the same. Return
the same decision each time.