[New] Payment API
GET /billing/settings
Allow user to retrieve payment settings
Parameters
Parameter | Type | Description |
---|
Response
{
"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
Parameters
Parameter | Type | Location | Description |
---|---|---|---|
|
|
| "card" for credit card, more to be supported later e.g bitcoin,.. (no need???) |
|
|
| token obtain from Stripe after posting card detail to api.stripe.com |
|
| Query string |
|
|
| Query string | (optional) |
Response
{
"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
Parameters
Parameter | Type | Description |
---|---|---|
|
| Payment source id |
Response
{
"data": []
}
GET /billing/sources?room_code=abc&provider_id=12312
Allow user to retrieve all payment sources from their account
Parameters
Parameter | Type | Location | Description |
---|---|---|---|
|
|
| (optional) "card" for credit card, more to be supported later e.g bitcoin,.. |
|
|
|
|
|
|
| (optional) |
Response
GET /billing/sources/:id (new)
Allow user to retrieve a payment source from their account
Parameters
Parameter | Type | Description |
---|---|---|
|
| Payment source id |
Response
PUT /billing/sources/:id
Allow user to make this card as default card
Parameters
Parameter | Type | Description |
---|---|---|
|
| 1 |
|
| If it’s CC app, we need to pass this parameter |
|
| If it’s FS app, then we need to pass this parameter |
Response
POST /billing/invoices/process
Allow user to process invoice
Parameters
Parameter | Type | Description |
---|---|---|
|
| Coupon code |
|
| Required - intake id to apply coupon code to |
|
| 1 |
Response