Tokenize payment methods
Changed onCalls the payment gateway to validate the payment method, which is not yet associated with a user. A front-end should call this endpoint directly, not a back-end. Requires a public developer key (use the AD-Public-Developer-Key header), which you must obtain from AppDirect.
Request
- Base URLhttps://marketplace.appdirect.com/api
- Authnone declared. Required headers: AD-Public-Developer-Key
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Headers
Request body
Example request
{
"paymentMethodType": "CARD",
"properties": {
"number": "4111111111111111",
"securityCode": "123",
"cardHolderName": "John Smith",
"expirationMonth": "5",
"expirationYear": "2019",
"brand": "VISA"
},
"billingAddress": {
"street1": "279 Prince St",
"city": "Montreal",
"state": "Quebec",
"country": "CA",
"zip": "H3C 2N4"
}
}Response
OK
Example response
{
"id": "pm_0838a859-dfa6-4863-aa38-042d50a9e69a",
"expiration": "2018-04-112T19:15:00Z",
"paymentMethod": {
"accountDisplay": "1111",
"paymentMethodType": "CARD",
"properties": {
"cardHolderName": "John Smith",
"expirationMonth": "5",
"expirationYear": "2019",
"brand": "VISA"
},
"billingAddress": {
"street1": "279 Prince St",
"city": "Montreal",
"state": "Quebec",
"country": "CA",
"zip": "H3C 2N4"
}
}
}Changes
- breaking
added
subschema #2: PaymentMethodTokenRequestto the request bodyallOflist - breaking
the response's body type changed from no type to
objectfor status - breaking
the response's body type changed from no type to
objectfor status - breaking
the response's body type changed from no type to
objectfor status - breaking
the response's body type changed from no type to
objectfor status - breaking
the response's body type changed from no type to
objectfor status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the required property
to the response with the status - info
added the required property
to the response with the status - info
added the required property
to the response with the status - info
added the required property
to the response with the status - info
added the required property
to the response with the status - info
added the required property
to the response with the status - info
added the required property
to the response with the status - info
added the required property
to the response with the status - info
added the required property
to the response with the status - info
added the required property
to the response with the status - info
added the required property
to the response with the status
- breaking