Payment API

GET /billing/settings

Allow user to retrieve payment settings

Parameters

Parameter

Type

Description

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

Parameter

Type

Location

Description

type

String

 

"card" for credit card, more to be supported later e.g bitcoin,.. (no need???)

token

String

 

token obtain from Stripe after posting card detail to api.stripe.com

room_code

String

Query string

 

provider_id

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

Parameter

Type

Description

id

String

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

Parameter

Type

Location

Description

type

String

 

(optional) "card" for credit card, more to be supported later e.g bitcoin,..

room_code

String

Query string

 

provider_id

String

Query string

(optional)

Response

GET /billing/sources/:id (new)

Allow user to retrieve a payment source from their account

Parameters

Parameter

Type

Description

Parameter

Type

Description

id

String

Payment source id

Response

PUT /billing/sources/:id

Allow user to make this card as default card

Parameters

Parameter

Type

Description

Parameter

Type

Description

is_default

int

1

room_code

String

If it’s CC app, we need to pass this parameter

provider_id

String

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

Parameter

Type

Description

promo_code

String

Coupon code

intake_id

String

Required - intake id to apply coupon code to

create_invoice

int

1

Response