GET /billing/settings
Allow user to retrieve payment settings
...
Code Block |
---|
{ "data": { "stripe": { "publishable_key": "2342342" } } } |
POST /billing/sources?room_code=abc&provider_id=12312
Allow user to add a new payment source to their account
...
Code Block |
---|
{ "data": { "id": "card_19DrgXBY2jn2BCqQNpjjzuay", "type": "card", "brand": "Visa", "country": "US", "exp_month": 8, "exp_year": 2017, "funding": "credit", "last4": "4242", "name": "Jack Sparrow", "is_default": true } } |
DELETE /billing/sources/:id
Allow user to delete payment source from his account
...
Response
Code Block |
---|
{ "data": [] } |
GET /billing/sources?room_code=abc&provider_id=12312
Allow user to retrieve all payment sources from their account
...
Code Block |
---|
{ "data": [ { "id": "card_19DrgXBY2jn2BCqQNpjjzuay", "type": "card", "brand": "Visa", "exp_month": 8, "exp_year": 2017, "last4": "4242", "name": "Jack Sparrow", "is_default": true }, { "id": "card_19DrgXBY2jn2BCqQNpjjzuay", "type": "card", "brand": "Visa", "exp_month": 8, "exp_year": 2017, "last4": "4242", "name": "JackSparrow", "is_default": false } ] } |
GET /billing/sources/:id (new)
Allow user to retrieve a payment source from their account
...
Code Block |
---|
{ "data": { "id": "card_19DrgXBY2jn2BCqQNpjjzuay", "type": "card", "brand": "Visa", "exp_month": 8, "exp_year": 2017, "last4": "4242", "name": "Jack Sparrow", "is_default": true } } |
PUT /billing/sources/:id
Allow user to make this card as default card
...
Code Block |
---|
{ "data": { "id": "card_19DrgXBY2jn2BCqQNpjjzuay", "type": "card", "brand": "Visa", "exp_month": 8, "exp_year": 2017, "last4": "4242", "name": "Jack Sparrow", "is_default": true } } |
POST /billing/invoices/process
Allow user to process invoice
...