Transactions represent the Affirm loans that are issued to the end-user. You can interact with transactions via the [Transactions API](🔗) in order 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 will be 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, Capture Transaction, etc., need to include this custom `
HTTP` header parameter to those requests:
When the `
country-code` parameter is used, it will be followed by the three-letter country code as shown below:
country-code` parameter tells Affirm what country of legal incorporation is associated with the store where the user’s transaction was made, as well as what Affirm regional environment to route this request to. This is also an alpha-3 country code. If this parameter is missing, we will default to `
Any end-user disclosures or emails that may be associated with this API will be sent in the language associated with the locale sent to `
Affirm.js` when the transaction was made. For example, if `
‘fr_CA”` was passed to \`Affirm.js when this transaction was made, all emails and user communications associated with the APIs involved in this transaction will be shown in Canadian French.
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](🔗) allow you to manage transactions across various [states](🔗) including authorized, captured, voided, etc.