1.
The server creates an order: pass in app_id + amount + user information + return url
2.
Obtain the checkout_url, and the front-end will redirect, preferably redirecting on the current page instead of opening a new window
3.
After successful payment, it will redirect back to the success_url, with checkout_id and 302_signature included in the query parameters.
4.
The server uses the checkout_id to verify whether the payment is successful. If successful, proceed to the next step.
The webhook will pass 302_signature in the header to facilitate verification of whether the request is authentic.Request
Body Params application/jsonRequired
{
"app_id": "string",
"price": 0,
"customer": {
"id": "string",
"email": "string"
},
"success_url": "string",
"request_id": "string",
"metadata": {},
"back_url": "string",
"secret": "string",
"signature": "string"
}
Request Code Samples
curl --location --request POST 'https://api.302.ai/v1/checkout' \
--header 'Authorization: Bearer ' \
--header 'Content-Type: application/json' \
--data-raw '{
"app_id": "string",
"price": 0,
"customer": {
"id": "string",
"email": "string"
},
"success_url": "string",
"request_id": "string",
"metadata": {},
"back_url": "string",
"secret": "string",
"signature": "string"
}'
Responses
application/json {
"id": "string",
"app_id": "string",
"mode": "string",
"checkout_url": "string",
"status": "string",
"price": 0,
"customer": {
"id": "string",
"email": "string"
},
"request_id": "string",
"success_url": "string",
"metadata": "string"
}
Modified at 2025-11-14 10:52:14