Skip to main content

Authorization Resources

This page documents the resources related to Authorizations. For the complete list of all resources, see Resources.

Authorization

Authorization is a JSON:API resource representing a card authorization. Top-level fields:

NameTypeDescription
idstringIdentifier of the authorization resource.
typestringType of the resource. The value is always authorization.
attributesJSON ObjectJSON object representing the authorization data.
relationshipsJSON:API RelationshipsDescribes relationships between the authorization and other resources.

Attributes

NameTypeDescription
createdAtRFC3339 Date stringThe date the resource was created.
amountintegerThe amount (cents) of the authorization.
cardLast4DigitsstringThe last 4 digits of the card number.
statusstringThe status of the authorization. One of Authorized, Completed, Canceled, Declined.
declineReason OptionalstringOptional. The reason the authorization was declined. Available only when status is Declined.
declineDescription OptionalstringOptional. A human-readable description providing additional detail about the decline. Only present on some declined authorizations.
declinedBy OptionalstringOptional. The entity that declined the authorization. One of Visa, Org, or Unit. Available only when status is Declined.
merchantobjectInformation about the merchant including name, type, and id.
recurringbooleanWhether this is a recurring authorization.
tagsobjectSee Tags.

Relationships

NameTypeDescription
accountJSON:API RelationshipThe Deposit Account.
customerJSON:API RelationshipThe Customer.
cardJSON:API RelationshipThe Card.
Example Authorization resource:
{
"type": "authorization",
"id": "1",
"attributes": {
"createdAt": "2021-06-24T08:10:08.081Z",
"amount": 2000,
"cardLast4Digits": "1234",
"status": "Authorized",
"merchant": {
"name": "Merchant name",
"type": "6012",
"id": "311204598883"
},
"recurring": false,
"tags": {}
},
"relationships": {
"account": {
"data": {
"type": "account",
"id": "10001"
}
},
"customer": {
"data": {
"type": "customer",
"id": "10000"
}
},
"card": {
"data": {
"type": "card",
"id": "7"
}
}
}
}