Create an Authorization

attention

This API is available for Finix Flex and Finix Core customers.

Authorizations can have two possible states, SUCCEEDED and FAILED. If the Authorization has succeeded, it must be captured before the expires_at or the funds will be released.

Learn how to prevent duplicate authorizations by passing an idempotency ID in the payload.

warning

Authorizations on debit cards place a hold on funds in the cardholder's bank account and may lead to lower than expected balances and/or insufficient funds issues.

attention

If the transfer field of an Authorization is null, it has not been captured yet.

Copy
Copied
curl https://finix.sandbox-payments-api.com/authorizations \
    -H "Content-Type: application/vnd.json+api" \
    -u  USsRhsHYZGBPnQw8CByJyEQW:8a14c2f9-d94b-4c72-8f5c-a62908e5b30e \
    -d '
	{
	    "source": "PIe2YvpcjvoVJ6PzoRPBK137",
	    "merchant": "MUeDVrf2ahuKc9Eg5TeZugvs",
	    "tags": {
	        "order_number": "21DFASJSAKAS"
	    },
	    "currency": "USD",
	    "amount": 100,
	    "processor": "DUMMY_V1"
	}'

Example Response:

Copy
Copied
{
  "id" : "AUeF44FtmytK6XD3JxjUt7HT",
  "application" : "APgPDQrLD52TYvqazjHJJchM",
  "amount" : 100,
  "tags" : {
    "order_number" : "21DFASJSAKAS"
  },
  "state" : "SUCCEEDED",
  "currency" : "USD",
  "transfer" : null,
  "messages" : [ ],
  "raw" : null,
  "created_at" : "2022-01-27T07:37:19.16Z",
  "updated_at" : "2022-01-27T07:37:19.28Z",
  "trace_id" : "b9e38593-da27-49e7-b948-f6c1d59d5e7e",
  "source" : "PIe2YvpcjvoVJ6PzoRPBK137",
  "merchant_identity" : "IDpYDM7J9n57q849o9E9yNrG",
  "3ds_redirect_url" : null,
  "is_void" : false,
  "void_state" : "UNATTEMPTED",
  "expires_at" : "2022-02-03T07:37:19.16Z",
  "idempotency_id" : null,
  "_links" : {
    "self" : {
      "href" : "https://finix.sandbox-payments-api.com/authorizations/AUvAZfiEH7irXZf49P7o8P1r"
    },
    "application" : {
      "href" : "https://finix.sandbox-payments-api.com/applications/APgPDQrLD52TYvqazjHJJchM"
    },
    "merchant_identity" : {
      "href" : "https://finix.sandbox-payments-api.com/identities/IDpYDM7J9n57q849o9E9yNrG"
    }
  }
}

HTTP Request

POST https://finix.sandbox-payments-api.com/authorizations

Request Arguments

Field Type Description
source string, required The Payment Instrument that you will be performing the authorization
merchant_identity string, required The ID of the Identity for the merchant that you are transacting on behalf of
amount integer, required The amount of the authorization in cents
currency string, required 3-letter ISO code designating the currency (e.g. USD)
processor string, optional If the Application has more than one processor association, it's required to pass the processor (e.g. DUMMY_V1)
tags object, optional Key value pair for annotating custom metadata (e.g. order numbers)
idempotency_id string, optional A randomly generated value that you want associated with the request