For the complete documentation index, see llms.txt. This page is also available as Markdown.

Card authorization callback

UR synchronously calls the partner-hosted authorization endpoint (registered during onboarding) on every card authorization for Card Mode: Crypto Backed users. UR signs the request body with EIP-191 (headers X-Api-Signature and X-Api-PublicKey); the partner must verify the signature against UR's pinned public key before acting, then respond within 500 ms with a signed decision. Timeouts, 5xx responses, signature failures, or invalid responses are treated as DECLINE for the swipe.

Payload

Signed authorization envelope UR sends to the partner-hosted endpoint. UR signs the raw JSON body with EIP-191 (X-Api-Signature, 0x-prefixed 65-byte hex) and sends its signer address in X-Api-PublicKey; the partner must verify the recovered signer equals the UR public key pinned during onboarding before acting. X-Request-Id matches data.requestId for logging.

eventconst: card_authorizationRequired

Always card_authorization.

timestampinteger · int64Required

Unix seconds when the request was built.

Responses
200

The partner's decision. APPROVE settles against the Prefund Account in paidCurrency; PASS falls back to the user's own UR fiat balance with no Prefund debit; DECLINE rejects the swipe. The partner must sign the response body with EIP-191 over body + " " + deadline and send X-Api-Signature, X-Api-Deadline, and X-Api-PublicKey headers; UR retains final authority and may still decline after an APPROVE.

application/json

Payload

{
  "event": "card_authorization",
  "timestamp": 1713700000,
  "data": {
    "version": "1",
    "requestId": "auth-req-uuid-001",
    "expiresAt": 1713700500,
    "action": "AUTHORIZE",
    "partnerId": "partner_example",
    "userId": "7123456789",
    "authorizationToken": "marqeta-auth-token-001",
    "transaction": {
      "currency": "SGD",
      "amount": "10000"
    },
    "settlement": {
      "currency": "USD",
      "amount": "7450"
    },
    "merchant": {
      "id": "merchant-123",
      "name": "Coffee Shop",
      "mcc": "5812",
      "city": "Singapore",
      "country": "SG"
    }
  }
}

Last updated