Managing Global Transactions

Aperçu

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.

Gestion des transactions

Gestion des transactions


Autorisation des transactions

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

Vous pouvez intégrer diverses transactions dans votre système dorsal de gestion des commandes, dans lequel vous exécutez normalement les commandes et traitez les paiements, les remboursements et les annulations.

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.