Skip to main content

Cards: Authorizations

The authorization (also authorization hold) process is an essential step in completing a card transaction. During authorization, the merchant receives the card holder’s information and verifies that the card is valid and that the card holder has sufficient funds to cover the amount of the transaction. Most merchants proceed immediately from authorization to the completion of the transaction, but they have the option to place a hold instead.

An authorization effectively “reserves” a certain amount of the card holder’s available funds for the merchant upon completion of the card transaction. The amount of the authorization is made unavailable to the card holder, but it isn’t transferred to the merchant’s account—not yet. When the transaction is settled, the authorization will be removed, and the card holder is charged the actual, final purchase amount.

The authorized amount will be included in the card holder account hold amount and will be reflected in the account available amount (see Deposit Account)

Get by Id#

Get an authorization resource by id.

VerbGET
Urlhttps://api.s.unit.sh/authorizations/{id}
Required Scopeauthorizations

Response#

Response is a JSON:API document.

200 OK#

FieldTypeDescription
dataAuthorizationAuthorization resource.
curl -X GET 'https://api.s.unit.sh/authorizations/1' \-H "Authorization: Bearer ${TOKEN}"

List#

List authorizations. Filtering and paging can be applied.

VerbGET
Urlhttps://api.s.unit.sh/authorizations
Required Scopeauthorizations

Query Parameters#

NameTypeDefaultDescription
page[limit]integer100Maximum number of resources that will be returned. Maximum is 1000 resources.
page[offset]integer0Number of resources to skip.
filter[accountId]string(empty)Optional. Filters the results by the specified account id.
filter[customerId]string(empty)Optional. Filters the results by the specified customer id.
filter[cardId]string(empty)Optional. Filters the results by the specified card id.
filter[since]RFC3339 Date string(empty)Optional. Filters the Authorizations that occurred after the specified date. e.g. 2020-01-13T16:01:19.346Z
filter[until]RFC3339 Date string(empty)Optional. Filters the Authorizations that occurred before the specified date. e.g. 2020-01-02T20:06:23.486Z
curl -X GET 'https://api.s.unit.sh/authorizations?page[limit]=20&page[offset]=0' \-H "Authorization: Bearer ${TOKEN}"

Response#

Response is a JSON:API document.

200 OK#

FieldTypeDescription
dataArray of AuthorizationArray of authorization resources.
Example Response:
{  "data": [    {      "type": "authorization",      "id": "90",      "attributes": {        "createdAt": "2021-02-16T07:40:44.970Z",        "amount": 2000,        "cardLast4Digits": "",        "merchant": {          "name": "Europcar Mobility Group",          "type": 3381,          "category": "EUROP CAR",          "location": "Cupertino, CA"        }      },      "relationships": {        "customer": {          "data": {            "type": "customer",            "id": "10000"          }        },        "account": {          "data": {            "type": "account",            "id": "10001"          }        },        "card": {          "data": {            "type": "card",            "id": "10501"          }        }      }    }  ]}