Get All Payment Methods
Method for fetching all payment methods by customer
Staging and Production environment URLs:
| Environment | API Host |
|---|---|
| Staging | https://caas-staging.coinme.com |
| Production | https://caas.coinme.com |
Sample API request: GET
URL: https://caas-staging.coinme.com/services/paymentmethods?customerId=1234321
headers:
"Authorization":"asdfghj", //authorization token, required
'User-Agent: partnerapi' //required
'Content-Type: application/json'
Sample API Response:
Successful Response:
{
"data": {
"paymentMethods": [
{
"paymentMethodId": "123456",
"providerId": "654987321",
"providerName": "Provider Name",
"type": "DEBIT", // could be DEBIT, CREDIT or PREPAID
"cardProvider": "Visa",
"card": {
"cardNumber": "123412321",
"month": "03",
"year": "2024"
},
"billingAddress": {
"firstName": "John",
"lastName": "Doe",
"country": "US",
"addressLine1": "11 Creekside St.",
"addressLine2": "Additional line",
"zipCode": "33414",
"city": "West Palm Beach",
"state": "FL"
},
"status": "VERIFIED", //enum, could be [CREATED, VERIFIED, DECLINED, STAGED, DELETED]
"buySupported": false,
"sellSupported": true,
"createdAt": 1714560970, //timestamp in millis
"verifiedAt": 1714560970 //timestamp in millis
}
.....
]
},
"errorResponse": null
}
Failure Response:
{
"data": null,
"errorResponse": {
"httpStatus":"200",
"timestamp":"2022-02-01T18:59:28.297Z",//UTC
"path":"/external/partners/v1/payment-method",
"errorData": [
{
"errorCode":"123-123-123-123", //The error code is just a sample showing the structure of the error code.
"message":"Invalid account id"
}
]
}
}Updated about 13 hours ago