Stripe Checkout is a payment gateway that allows you to accept payments on your website.
To get the Iframe URL, you need to make a GET request to the following URL:http(s)://<HOST>/paymentgateways/getRequest
All parameters are passed via JSON in data
field of the request. Structure of the JSON is as follows:
Parameter | Type | Description |
---|---|---|
iframe |
boolean |
Hardcoded true |
aid |
string |
Billrun Account ID |
name |
string |
hard-coded to StripeCheckout |
type |
string |
hard-coded to account |
_t_ |
string |
Current timestamp |
ok_page |
string |
URL to redirect to on success |
fail_page |
string |
URL to redirect to on failure |
Parameter | Type | Description |
---|---|---|
amount |
float |
Amount to charge |
request_parameters |
boolean |
Default is false . If set to true , the response will include additional parameters. |
The response is a JSON object with the following structure:
Parameter | Type | Description |
---|---|---|
status |
int |
Status of the request. 1 - success 0 - failure |
desc |
string |
Description of the request. |
detatils |
object |
Object containing additional details. |
details.url |
string |
URL to redirect to. |
If request_parameters
is set to true
, the response will include additional parameters.
Example for request_parameters
set to false
:
{
"status": 1,
"desc": "success",
"details": {
"url": "https://checkout.stripe.com/c/pay/cs_test_c1Hy9K8W4sWijiBlqH73YDpKRRsjNgvoBY3Gp1AhRffujjOVh2IZLv03f7#fidkdWxOYHwnPyd1blpxYHZxWjA0SFdEX2JNNGo1SmF9fDFGcHZuVD1WMHxGTGp%2Fa2F8ZmdAUjY2c0BVcWw9cFduYnNWMFZHaklObkd2MUhBPVE3anFPbmBTYDAyMFY0cVdgMjA0bkBwZ0xgNTVrXGxAQkFyMicpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPyd2bGtiaWBaZmppcGhrJyknYGtkZ2lgVWlkZmBtamlhYHd2Jz9xd3BgeCUl"
}
}
If request_parameters
is set to true
, the response will include additional parameters.
{
"status": 1,
"desc": "success",
"details": {
"url": {
"url": "https://checkout.stripe.com/c/pay/cs_test_c1o9qMVnGqNn8o15oghJRs5w2ZpUeFHQIYLYfx3T1yhcIhrEoIB5JdM7RT#fidkdWxOYHwnPyd1blpxYHZxWjA0SFdEX2JNNGo1SmF9fDFGcHZuVD1WMHxGTGp%2Fa2F8ZmdAUjY2c0BVcWw9cFduYnNWMFZHaklObkd2MUhBPVE3anFPbmBTYDAyMFY0cVdgMjA0bkBwZ0xgNTVrXGxAQkFyMicpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPyd2bGtiaWBaZmppcGhrJyknYGtkZ2lgVWlkZmBtamlhYHd2Jz9xd3BgeCUl",
"session_id": "cs_test_c1o9qMVnGqNn8o15oghJRs5w2ZpUeFHQIYLYfx3T1yhcIhrEoIB5JdM7RT",
"session": {
"id": "cs_test_c1o9qMVnGqNn8o15oghJRs5w2ZpUeFHQIYLYfx3T1yhcIhrEoIB5JdM7RT",
"object": "checkout.session",
"after_expiration": null,
"allow_promotion_codes": null,
"amount_subtotal": null,
"amount_total": null,
"automatic_tax": {
"enabled": false,
"status": null
},
"billing_address_collection": null,
"cancel_url": "http://failpage?txId=9488016758585159237",
"client_reference_id": null,
"consent": null,
"consent_collection": null,
"created": 1675858516,
"currency": null,
"custom_text": {
"shipping_address": null,
"submit": null
},
"customer": "cus_NEaf8oNRKyAqhI",
"customer_creation": null,
"customer_details": {
"address": null,
"email": "test@gmail.com",
"name": null,
"phone": null,
"tax_exempt": null,
"tax_ids": null
},
"customer_email": null,
"expires_at": 1675944916,
"invoice": null,
"invoice_creation": null,
"livemode": false,
"locale": null,
"metadata": [],
"mode": "setup",
"payment_intent": null,
"payment_link": null,
"payment_method_collection": "always",
"payment_method_options": [],
"payment_method_types": [
"card"
],
"payment_status": "no_payment_required",
"phone_number_collection": {
"enabled": false
},
"recovered_from": null,
"setup_intent": "seti_1MZCYSH1o0Odxy4CjflKge7m",
"shipping_address_collection": null,
"shipping_cost": null,
"shipping_details": null,
"shipping_options": [],
"status": "open",
"submit_type": null,
"subscription": null,
"success_url": "http://okpage?txId=9488016758585159237",
"total_details": null,
"url": "https://checkout.stripe.com/c/pay/cs_test_c1o9qMVnGqNn8o15oghJRs5w2ZpUeFHQIYLYfx3T1yhcIhrEoIB5JdM7RT#fidkdWxOYHwnPyd1blpxYHZxWjA0SFdEX2JNNGo1SmF9fDFGcHZuVD1WMHxGTGp%2Fa2F8ZmdAUjY2c0BVcWw9cFduYnNWMFZHaklObkd2MUhBPVE3anFPbmBTYDAyMFY0cVdgMjA0bkBwZ0xgNTVrXGxAQkFyMicpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPyd2bGtiaWBaZmppcGhrJyknYGtkZ2lgVWlkZmBtamlhYHd2Jz9xd3BgeCUl"
}
}
}
}
Action description: request success token. This will check with CG (backend to backend) if the success input [transaction] is really success (3-sided hand-shake).
When the iframe return with ok-page, you'll receive txId on GET or POST. You'll need to use this txId in this API.
URL: http://<HOST>/paymentgateways/okPage
StripeCheckout
object json encoded with the following properties: