Payments
#
1. Initial Payment StepTo start the payment process
URL
/paylink?amount=1
Method:
GET
Header Params
Authorization='Bearer ' + access_token
URL Query Params
Required:
amount=[Number] (example: 1.2)
Success Response:
- Code: 200
Content:https://brambleapi.herokuapp.com/bramblepay?pintent=21312312
- Code: 200
Error Response:
Code: 401
Content:
{ "statusCode": 401, "status": 401, "code": 401, "message": "Invalid token: access token has expired", "name": "invalid_token" }
Code: 401
Content:
{ "statusCode": 401, "status": 401, "code": 401, "message": "Invalid token: access token is invalid", "name": "invalid_token" }
Sample Call:
#
2. Opens the Payment PageOpens up the Bramble Payment Page. You have to just open the URL recieved in the previous request.
URL
/bramblepay?pintent=21312312
Method:
GET
URL Query Params
Required:
pintent=[String] (example: '21312312')
Success Response:
- Code: 200
Content:Opens the Bramble Payment Page for the user
- Code: 200
Error Response:
Will show Bramble API's generic Error Page
Sample Call:
Notes: After successful completion of the payment the user will be redirected back to the game with the payment intent as a url param. Use that payment intent in the next step. Actually you recieve that payment intent in the 1st request as well.
#
3. Payment ReceiptTo get the receipt of the payment and also confirm the receival of payment.
URL
/payment_received_confirmation
Method:
GET
Header Params
Authorization='Bearer ' + access_token_received_in_grant_request
Body Params(raw JSON)
{ "paymentintent": "607eb2ac1088153ca09ce7b3", }
Success Response:
- Code: 200
Content:{ _id: '607eb2ac1088153ca09ce7b3', sender_account: 'rahul.soshte47@gmail.com', receiver_account: 'mansim', amount: 1, status: 'closed', __v: 0 }
- Code: 200
Error Response:
1)
Some error
2)No such txn
Sample Call: