username:password
Authorization: Basic *****************
{
"cancel_url": "https://yourwebsite.com",
"mode": "payment",
"success_url": "https://yourwebsite.com",
"line_items": [
{
"price_data": {
"currency": "GBP",
"unit_amount": 2000,
"product_data": {
"name": "apple"
}
},
"quantity": 1
}
]
}
curl --location --request POST 'https://apitest.wooshpay.com/v1/checkout/sessions' \
--header 'Accept;' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic Og==' \
--data-raw '{
"cancel_url": "https://yourwebsite.com",
"mode": "payment",
"success_url": "https://yourwebsite.com",
"line_items": [
{
"price_data": {
"currency": "GBP",
"unit_amount": 2000,
"product_data": {
"name": "apple"
}
},
"quantity": 1
}
]
}'
{
"id": "string",
"object": "string",
"amount_subtotal": 0,
"amount_total": 0,
"billing_address_collection": "required",
"cancel_url": "string",
"client_reference_id": "string",
"created": 0,
"currency": "string",
"customer": "string",
"customer_email": "string",
"expires_at": 0,
"livemode": true,
"metadata": {},
"mode": "string",
"payment_intent": "string",
"payment_link": "string",
"payment_method_options": {
"card": {
"request_three_d_secure": "any",
"setup_future_usage": "on_session",
"capture_method": "string",
"tax_id": "string"
},
"alipayplus": {
"terminal_type": "APP",
"os_type": "IOS"
},
"alipay_hk": {
"terminal_type": "APP",
"os_type": "IOS"
},
"alipay": {
"terminal_type": "APP",
"os_type": "IOS"
},
"wechat_pay": {
"terminal_type": "WEB",
"client_ip": "string",
"os_type": "IOS",
"openid": "string"
},
"sepa_debit": {},
"akulaku": {
"terminal_type": "WEB",
"os_type": "IOS"
},
"truemoney": {
"terminal_type": "WEB",
"os_type": "IOS"
},
"kakaopay": {
"terminal_type": "WEB",
"os_type": "IOS"
},
"shopeepay": {
"terminal_type": "string",
"os_type": "string"
},
"dana": {
"terminal_type": "string",
"os_type": "string"
},
"pix": {
"tax_id": "string"
}
},
"payment_method_types": [
"string"
],
"payment_status": "string",
"phone_number_collection": {
"enabled": true
},
"shipping_address_collection": {
"allowed_countries": [
"string"
]
},
"shipping": {
"address": {
"city": "string",
"country": "string",
"line1": "string",
"line2": "string",
"postal_code": "string",
"state": "string"
},
"carrier": "string",
"name": "string",
"phone": "string",
"tracking_number": "string"
},
"status": "open",
"success_url": "string",
"url": "string",
"line_items": {
"object": "\"list\"",
"url": "string",
"has_more": true,
"data": [
{
"id": "string",
"object": "string",
"amount_subtotal": "string",
"amount_total": "string",
"currency": "string",
"description": "string",
"price": {
"id": "string",
"object": "string",
"active": true,
"billing_scheme": "per_unit",
"created": 0,
"currency": "string",
"livemode": true,
"lookup_key": "string",
"metadata": {},
"nickname": "string",
"product": "string",
"type": "one_time",
"unit_amount": 0,
"recurring": {
"interval": "day",
"interval_count": 0,
"usage_type": "licensed"
},
"tiers": [
{
"up_to": "string",
"flat_amount": "string",
"unit_amount": "string"
}
]
},
"quantity": "string",
"discounts": [
{
"id": "string",
"object": "string",
"checkout_session": "string",
"coupon": {
"id": "string",
"amount_off": 0,
"currency": "string",
"duration_in_days": "string",
"object": "string",
"created": 0,
"livemode": true,
"metadata": {},
"name": "string",
"percent_off": 0,
"max_redemptions": 0,
"redeem_by": 0,
"times_redeemed": 0,
"valid": true,
"currency_options": {
"<currency>.amount_off": 0
}
},
"customer": "string",
"start": 0,
"end": null,
"promotion_code": null,
"subscription": null
}
],
"amount_discount": 0
}
]
},
"subscription": "string",
"customer_creation": "always",
"customer_details": {
"address": {
"city": "string",
"country": "string",
"line1": "string",
"line2": "string",
"postal_code": "string",
"state": "string"
},
"email": "string",
"name": "string",
"phone": "string"
}
}