GET /billing/settings
Allow user to retrieve payment settings
Parameters
Parameter | Type | Description |
---|
Response
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
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
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
Parameters
Parameter | Type | Description |
---|---|---|
|
| Payment source id |
Response
Code Block |
---|
{ "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
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
Parameters
Parameter | Type | Description |
---|---|---|
|
| Payment source id |
Response
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
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
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
Parameters
Parameter | Type | Description |
---|---|---|
|
| Coupon code |
|
| Required - intake id to apply coupon code to |
|
| 1 |
Response
Code Block |
---|
{ "data": { "currency": "USD", "consultation": { "description": "30 mins", "amount": 30, "duration": 30, "id": "58244a53-0f28-4ff9-bdbc-7468ac1f0144" }, "coupon": { "id": "10_percents_1479363579", "object": "coupon", "amount_off": null, "created": 1479363580, "currency": null, "duration": "once", "duration_in_months": null, "livemode": false, "max_redemptions": null, "metadata": [ ], "percent_off": 10, "redeem_by": null, "times_redeemed": 0, "valid": true }, "amount_due": 27 } } |