Payment
How to create a new Stripe payment for the logged user
Calling this API will immediately charge the user for the amount of the product.
For the billing lifecycle please refer to Stripe documentation
Request
Response
POST https://mburger.cloud/api/payments
1
curl https://mburger.cloud/api/payments
2
-X POST
3
-H "Accept: application/json"
4
-H "X-MBurger-Token: <token>"
5
-H "X-MBurger-Version: 3"
6
-H "Authorization: Bearer <JWT>"
7
-d '<data>'
Copied!

Parameters

Name
Type
Required
Description
name
string
Yes
Payment identifier chosen on Stripe dashboard.
amount
int
Yes
Amount to charge for single product.
quantity
int
Yes
Quantity of products.
token
string
No
Source token provided by the Stripe SDK, it is not required if the user is already a customer and wants to use the default card.
meta
JSON
No
Additional data to save for the payment.
When successful, a HTTP 200 and JSON like this is returned:
1
{
2
"status_code": 0
3
}
Copied!
Last modified 1yr ago
Copy link