Skip to main content

Merchant Help

 

Affirm Merchant Help

User Acceptance Testing Guidelines

Before deploying an Affirm integration to your live site, we recommend thoroughly testing all affected components of your site and order management system, as they relate to creating and editing Affirm charges.

Front-End Site Testing (Sandbox)

  1. User initiates and completes Affirm payment flow with authorized charge
    • User is redirected to Affirm payment flow
    • User is prompted to input information / log-in
    • User inputs PIN: 1234
    • User chooses terms of loan and confirms
    • User is redirected to the user_confirmation_url with checkout_token in response
    • Authorize API call is used and response received
    • Charge status is "authorized" in sandbox merchant dashboard
  2. User initiates and does not complete Affirm payment flow
    • User is redirected to Affirm payment flow
    • User is prompted to input information / log-in
    • User fails to complete Affirm checkout
      • User exits by clicking "Return to [Merchant Name]" button
    • User is redirected to the intended user_cancel_url and is able to select another payment method

Order Management Testing (Sandbox)

  1. Capture an Authorized charge
    • Follow steps from Front-End Testing (Sandbox) to create an Authorized charge
    • Capture the order using whatever process you intend to use for fulfillment
    • Receive 200 response from Affirm APIs
    • Charge status is "captured" in sandbox merchant dashboard
  2. Void an Authorized charge
    • Follow steps from Front-End Testing (Sandbox) to create an Authorized charge
    • Void, Reverse, or Cancel the order using whatever process you intend your operations team to use
    • Receive 200 response from Affirm APIs
    • Charge status is "void" in sandbox merchant dashboard
  3. Refund a Captured charge
    • Follow steps from Front-End Testing (Sandbox) to create an Authorized charge
    • Follow steps from Order Management Testing (Sandbox) to Capture an Authorized charge
    • Refund or Cancel the order using whatever process you intend your operations team to use
    • Receive 200 response from Affirm APIs
    • Charge status is "cancelled" in sandbox merchant dashboard
  4. Partially refund a Captured charge
    • Follow steps from Front-End Testing (Sandbox) to create an Authorized charge
    • Follow steps from Order Management Testing (Sandbox) to Capture an Authorized charge
    • Refund the order for an amount less than the total, using whatever process you intend your operations team to use
    • Receive 200 response from Affirm APIs
    • Charge status is "refunded" in sandbox merchant dashboard

Admin and Account Settings

  1. Confirm all necessary admins or operations personnel have access to the Affirm Merchant Dashboard 
  2. Validate Affirm Live environment references
  3. Confirm setup for all necessary e-mail recipients for scheduled settlement reporting

Error Cases

Checkout

  1. User fails to initiate Affirm checkout due to invalid credentials
    • User inputs a fake address (non-existent zip code, etc) prior to entering Affirm checkout
    • User attempts to initiate Affirm payment
    • User receives a modal pop-up, explaining the errant field
    • User clicks "Return to Merchant"
    • User is taken back to the correct page to edit their details

Charge API

  1. Authorization failure:
    1. Pass an invalid or missing checkout_token with the authorization request.
    2. Start an Affirm checkout session, go to the last step, and don't finish/confirm the loan. Then in another browser start another checkout session and complete it. Go back to the first, in-progress checkout and complete it. The checkout_token for the first session was invalidated when the second checkout session was completed.
       
  2. Capture failure:
    1. Pass an invalid charge ID in the capture request URI
    2. Void the charge prior to attempting capture
    3. Capture the charge twice (duplicate capture)

Test Plan

You can download a version of this test plan here: Affirm_Test_Plan.xlsx