Managing Global Transactions
Overview
Transactions represent the Affirm loans that are issued to the end-user. You can use the Transactions API to change the state of that transaction, update metadata, or retrieve details.
Transactions authorization
Transactions authorization occurs after a user has successfully completed the Affirm checkout flow and returns back to the merchant site. Authorizing the transaction generates a unique id
that is used to reference the loan moving forward.
Country-code request header
To move outside of the United States, any API calls that are made to Affirm, such as Auth or Capture Transaction, need to include this custom HTTP
header parameter to those requests:
country-code
When the country-code
parameter is used, it is followed by the three-letter country code. For example:
country-code: "CAN"
The country-code
parameter tells Affirm which country of legal incorporation is associated with the store where the user’s transaction was made, and which Affirm regional environment to route the request to. This is also an alpha-3 country code. If this parameter is missing, we automatically use USA
.
Any end-user disclosures or emails that might be associated with this API are sent in the language associated with the locale sent to Affirm.js
when the transaction was made. For example, if fr_CA
is passed to Affirm.js
when the transaction is made, all emails and user communications associated with the APIs involved in this transaction are shown in Canadian French.
Actions
You can integrate various transactions into your back-end order management system, where you normally fulfill orders and process payments, refunds, and cancelations.
You can use the Transactions API to manage transactions with the following actions:
These actions enable you to manage transactions across various states including authorized, captured, voided, etc.
Updated 1 day ago