Create payment methods directly
To create a payment method using user-scoped authorization, pass the
paymentMethod
object as well as the user and company IDs. The
paymentMethod
can be a JSON object or an HTMLFormElement
. It must
contain all of the required information. See Create the paymentMethod object.
adPayment.createPaymentMethod(paymentMethod, userUUID, companyUUID)
.then(function(response) {
// return a summary of the payment method created
})
.error(function(error) {
// handle the error
});
Response
{
"id": "e35c2f85-ef92-4a8f-89f0-45b62fb95fa7",
"accountDisplay": "1111",
"default": true,
"paymentMethodType": "CARD",
"properties": {
"cardHolderName": "Bob Dylan",
"expirationMonth": "5",
"expirationYear": "2019",
"brand": "VISA",
"number": "1111"
},
"billingAddress": {
"street1": "279 Prince St",
"city": "Montreal",
"state": "Quebec",
"country": "CA",
"zip": "H3C 2N4"
}
}
Was this page helpful?
Tell us more…
Help us improve our content. Responses are anonymous.
Thanks
We appreciate your feedback!