Skip to main content

 

Affirm Merchant Help

Platform Acceptance Testing Guidelines

Before deploying your Affirm integration, you should test it to ensure that both the user experience and your order management system perform as expected. Complete your front-end and order management testing while connected to our sandbox. Do not use your own personal account to do test transactions in the Affirm live environment as Affirm furnishes loan and repayment information to credit bureaus. Capturing arbitrary test loans could impact your actual credit score. Please work with the Affirm channel partner integration team for testing in the live environment.

Click here for a sample test plan (not all tests may be applicable to your platform).

Admin configuration settings

Perform the following checks and tests while connected to our sandbox.

  1. In the admin settings, add your sandbox public and private keys
  2. Ensure that sandbox mode is enabled in the admin settings so that test transactions go to Affirm sandbox environment
  3. Ensure that the default value for payment during checkout is set to Affirm (refer to our Affirm Logos and Buttons)
  4. Go to the checkout page to verify that Affirm displays as a payment option
  5. Follow the steps below to test your front-end (test for both Authorize Only and Authorize & Capture) and order management system
  6. Verify that Affirm does not display for non-US billing and shipping address
  7. Verify that the checkout object includes platform-specific metadata information
  8. Verify that either the checkout object or the authorize/capture request includes order_id (order_id is part of the settlement reports sent by Affirm and is used for reconciliation purposes)
  9. Enable Affirm Promotional Messaging and verify placement on the following pages:
  • Home page / front page
  • Category page / product gallery / scroll
  • Product page
  • Cart or mini cart page

After you've tested your site, disable Affirm to verify that Affirm checkout and Affirm Promotional Messaging are no longer displayed.

Front-end testing (sandbox)

Initiate and complete the Affirm payment flow. Click here for the different Affirm checkout flows.

  1. Add an item to the cart on your test site
  2. Proceed to checkout
  3. During checkout, enter valid U.S. addresses and mobile-phone information (Affirm cannot test your configuration if the address or phone information is fake)
  4. Select Affirm as the payment option.
  5. If you have an existing account, click Sign In
  6. If you don’t have an existing account, create one with the following:
  • Any first and last name
  • An email address with a valid format
  • A valid US cell phone number (you do not need access to this number) that you will use in all subsequent checkout attempts
  • A birth date older than 18 years old
  • Any four digits
  1. Enter 1234 for the verification code and click VERIFY CODE
  2. Complete checkout flow and click CONFIRM LOAN
  3. Confirm that you are redirected to user_confirmation_url
  4. Confirm that the response includes the checkout token
  5. Confirm that the checkout process called the Authorize API endpoint and received a response
  6. Confirm that the charge status is authorized in the merchant dashboard

Initiate and abandon the Affirm payment flow.

  1. Initiate checkout to access the account creation screen
  2. If you have an existing account, click Sign In
  3. If you don’t have an existing account, create one with the following:
  • Any first and last name
  • An email address with a valid format
  • A valid US cell phone number (you do not need access to this number) that you will use in all subsequent checkout attempts
  • A birth date older than 18 years old
  • Any four digits
  1. Click Return to [merchant name]
  2. Confirm that you are redirected to user_cancel_url
  3. Confirm that you are able to select another payment method

Order management testing (sandbox)

Capture an authorized charge.

  1. Initiate checkout to access the account creation screen
  2. If you have an existing account, click Sign In
  3. If you don’t have an existing account, create one with the following:
  • Any first and last name
  • An email address with a valid format
  • A valid US cell phone number (you do not need access to this number) that you will use in all subsequent checkout attempts
  • A birth date older than 18 years old
  • Any four digits
  1. Enter 1234 for the verification code and click VERIFY CODE
  2. Complete checkout flow and click CONFIRM LOAN
  3. Capture the charge using the process you intend to use when fulfilling orders
  4. Confirm that you receive a 200 response from the Affirm API
  5. Confirm that the charge status is captured in the merchant dashboard

Void an authorized charge.

  1. Initiate checkout to access the account creation screen
  2. If you have an existing account, click Sign In
  3. If you don’t have an existing account, create one with the following:
  • Any first and last name
  • An email address with a valid format
  • A valid US cell phone number (you do not need access to this number) that you will use in all subsequent checkout attempts
  • A birth date older than 18 years old
  • Any four digits
  1. Enter 1234 for the verification code and click VERIFY CODE
  2. Complete checkout flow and click CONFIRM LOAN
  3. Void, reverse, or cancel the charge using the current void process used for other payment methods
  4. Confirm that you receive a 200 response from the Affirm API
  5. Confirm that the charge status is void in the merchant dashboard

Refund an captured charge.

  1. Initiate checkout to access the account creation screen
  2. If you have an existing account, click Sign In
  3. If you don’t have an existing account, create one with the following:
  • Any first and last name
  • An email address with a valid format
  • A valid US cell phone number (you do not need access to this number) that you will use in all subsequent checkout attempts
  • A birth date older than 18 years old
  • Any four digits
  1. Enter 1234 for the verification code and click VERIFY CODE
  2. Complete checkout flow and click CONFIRM LOAN
  3. Capture the charge using the process you intend to use when fulfilling orders
  4. Refund or cancel the charge using the current refund process used for other payment methods
  5. Confirm that you receive a 200 response from the Affirm API
  6. Confirm that the charge status is refunded in the merchant dashboard

Partially refund a captured charge.

  1. Initiate checkout to access the account creation screen
  2. If you have an existing account, click Sign In
  3. If you don’t have an existing account, create one with the following:
  • Any first and last name
  • An email address with a valid format
  • A valid US cell phone number (you do not need access to this number) that you will use in all subsequent checkout attempts
  • A birth date older than 18 years old
  • Any four digits
  1. Enter 1234 for the verification code and click VERIFY CODE
  2. Complete checkout flow and click CONFIRM LOAN
  3. Capture the charge using the process you intend to use when fulfilling orders
  4. Refund the charge for an amount less than the total using the current refund process used for other payment methods
  5. Confirm that you receive a 200 response from the Affirm API
  6. Confirm that the charge status is refunded in the merchant dashboard

Verify the order details of a test transaction.

  1. Verify that the order details show Affirm as the payment method for both the merchant and consumer views
  2. Verify that the Affirm Charge ID in the order details links to the loan and the charge in your merchant dashboard (see format below) 
  • User loan URL: https://www.affirm.com/u/#/loans/ChargeID?trk=publicKey
  • Merchant charge URL: https://www.affirm.com/dashboard/#/details/ChargeID?trk=publicKey

Error case testing

The customer sees an error when they enter invalid information before starting the Affirm checkout process.

  1. On your site, enter an invalid address (e.g., an invalid zip code) during checkout
  2. Initiate the Affirm checkout process
  3. Confirm that you see a modal explaining which field contains invalid information
  4. Click Return to Merchant
  5. Confirm that you return to the correct page to edit the field

Confirm that you get an error when doing the following while using the Charge API:

  • Pass an invalid or missing checkout token when authorizing a charge
  • Pass an invalid charge ID when capturing a charge
  • Void a charge before capturing it
  • Capture a charge twice

Admin and account settings (production)

Confirm the locations of all Affirm environment references that you'll need to switch from the sandbox to our live environment.