Payment Methods
Allow accounts to provide payment methods for billing purposes.
Prerequisites
Payment methods are managed using a proxy and your Stripe account. Backstack doesn't store your customer data on its servers. Your app must have a Stripe account connected to the Backstack dashboard.
Payment method object
http
GET https://api.backstack.com/account/payment-methods/:id
Returns a payment method object.
json
{
"id": "pym_1234567890",
"card_number": "**** **** **** 1111",
"expires": "01/2900",
"type": "Visa",
"expired": false,
"default": true
}
Resources
Payment methods list
http
GET https://api.backstack.com/account/payment-methods
?collection=true
Returns a collection list of the accounts payment methods.
json
[
{
"id": "pay_1234567890",
"card_number": "**** **** **** 1111",
"expires": "01/2900",
"type": "Visa",
"expired": false,
"default": true
},
...
]
Resources
Create payment method
http
POST https://api.backstack.com/account/payment-methods
{
"card_number": "4111111111111111",
"expiration_month": 12,
"expiration_year": 2045,
"cvv": "123",
}
Returns a payment method object.
Resources
Update payment method
Update the expiration date of a payment method.
http
POST https://api.backstack.com/account/payment-methods/:id
{
"expiration_month": 12,
"expiration_year": 2045,
}
Returns a payment method object.
Resources
Delete payment method
http
DELETE https://api.backstack.com/account/payment-methods/:id