Create payment methods using a token OR by providing all of the payment method data
Changed onWhen using a token, the validated payment method is assigned to the current user on the current marketplace. When providing all of the payment method data, the payment gateway is called, and the payment method is validated and assigned to the user.
Request
- Base URLhttps://marketplace.appdirect.com/api
- Authnone declared
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Request body
Example request
{
"ownerId": "40e8af95-4caf-415a-96d9-7b023207b535",
"companyId": "9c130291-cf29-4272-8005-a280b1e81388",
"token": "pm_0838a859-dfa6-4863-aa38-042d50a9e69a"
}Response
OK
Example response
{
"id": "e35c2f85-ef92-4a8f-89f0-45b62fb95fa7",
"accountDisplay": "1111",
"default": false,
"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 the new required request property
- breaking
added the new required request property
- breaking
the request's body type changed from no type to
object - 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 new optional request property
- info
added the new optional request property
- info
added the new optional request property
- info
added the new optional request property
- info
added
subschema #2: PaymentMethodAppMarketto the response bodyallOflist for the response 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
- breaking