Open Affirm Virtual Card Checkout
Use affirm.checkout.open_vcn()
to open Affirm Checkout in a modal for your customers, an Affirm-hosted page to securely complete the loan checkout. When the customer completes their purchase, you'll need to handle the callbacks.
affirm.checkout.open_vcn(checkout_data)
Method arguments
checkout_data | object | See details. |
---|
Returns
Returns callbacks that resolve in an error_response
or card_checkout
. Those objects have either:
card_checkout
: A card object was successfully created.error_response
: There was an error. Includes thecheckout_id
for the attempt and thereason
why it failed.
affirm.checkout.open_vcn({
success: function(card_checkout) {
console.log(card_checkout);
},
error: function(error_response) {
console.log(error_response);
}
});
You can configure that the card details should only be returned on the server-side. Please contact Affirm.
Updated over 2 years ago
Did this page help you?