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

Front-End Site Testing (Production)

  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

Error Cases

  1. Customers would not be directly informed about the status of the Affirm platform. Rather, if there's an error with the checkout request, Affirm JS will handle that generic exception. If there is a server-side error in the Affirm checkout flow that prevents a back-end process from completing, again a generic error message would be presented to the user. If there an error with the API call that you're making for charge authorization, you would want to handle that error so you can inform the user that the authorization failed.
     
    1. Recreate a front-end error: pass invalid contact information at checkout (this will result in a specific user-facing error message handled by Affirm JS) 
    2. If Affirm is completely down, and you can't download/initialize Affirm JS, then you'd want to handle that by showing the user messaging about Affirm's availability.
       
  2. 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.
       
  3. 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)