Integrating Affirm into CyberSource requires a merchant ID, which is the same ID value you will use for the sandbox and live environments.
1. Inform Affirm that you'd like to integrate with CyberSource.
2. Get your Affirm merchant ID from your Client Success Manager.
3. Provide your merchant ID to your CyberSource contact.
Follow the CyberSource Affirm Services integration guide to build your checkout and order management integration:
When you initiate checkout using the Sessions service, you'll receive a
checkout URL (merchantURL) in the Sessions Reply. Redirect the client browser to that
success_url value sent in the Sessions service. You will also receive the
checkout_token at this URL. (See FAQ section for initiating Affirm checkout in a modal)
checkout_token is included in the request (via
GET method) when the client is redirected back to your site (to the
success_url) after confirming their Affirm loan. Use this
checkout_token as preapprovalToken in the CyberSource authorization service.
Like a card transaction, the authorization will hold the funds and allow you to save the customer's order. The authorization response returns another
transaction id to use in subsequent actions (capture, refund, etc.).
Once you've fulfilled an order, capture the associated Affirm payment. Capturing a payment completes the transaction and initiates settlement into your bank account. Captures should occur within 30 days of the authorization. Affirm does not support multiple or partial capture requests. We recommend capturing the whole amount when shipping the first item, and refunding if the customer cancels the remaining items.
If you need to refund all or part of a transaction, you can use the Refund service. You can process any number of refunds, which can only be processed within 120 days of capturing the charge. A full refund cancels the transaction, which will refund the entire loan principal to the customer.
Updated 18 days ago