Skip to main content

Create payment methods with tokens

After you obtain a token with a PDK, create the payment method with the pmToken, as well as the user and company IDs.

adPayment.createPaymentMethod(pmToken, 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?