Request cURL PHP Node.js Python
curl "https://morzepay.com/v1/checkout/sessions/cs_J9WN4dg0YnY6VjMMwq0kL1" \
-H "Authorization: Bearer $MORZEPAY_KEY"$ch = curl_init('https://morzepay.com/v1/checkout/sessions/cs_J9WN4dg0YnY6VjMMwq0kL1');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('MORZEPAY_KEY'),
],
]);
$response = json_decode(curl_exec($ch), true);const res = await fetch('https://morzepay.com/v1/checkout/sessions/cs_J9WN4dg0YnY6VjMMwq0kL1', {
headers: {
Authorization: `Bearer ${process.env.MORZEPAY_KEY}`,
},
});
const response = await res.json();import os, requests
res = requests.get(
'https://morzepay.com/v1/checkout/sessions/cs_J9WN4dg0YnY6VjMMwq0kL1',
headers={'Authorization': f"Bearer {os.environ['MORZEPAY_KEY']}"},
)
response = res.json(){
"success": true,
"data": {
"id": "cs_J9WN4dg0YnY6VjMMwq0kL1",
"object": "checkout.session",
"livemode": true,
"status": "complete",
"reusable": false,
"url": "https://morzepay.com/c/83513594a9ee455aacf23ca24eeff21b",
"title": "Order #77812",
"description": null,
"line_items": [
{
"description": "Rolex combo",
"quantity": 2,
"unit_amount": "7000.00",
"amount": "14000.00"
}
],
"amount_total": "14000.00",
"allow_custom_amount": false,
"min_amount": null,
"currency": "UGX",
"fee_bearer": "wallet",
"wallet_id": "wal_8fK2mQx7RtP4nVb9LcHs2w",
"require_email": false,
"require_name": false,
"success_url": "https://yourshop.ug/thanks?session={CHECKOUT_SESSION_ID}",
"cancel_url": "https://yourshop.ug/cart",
"reference": "order-77812",
"customer": {
"name": null,
"email": null,
"phone": null
},
"metadata": null,
"payments_count": 1,
"amount_collected": "14000.00",
"transaction_id": "txn_Rk3Lp9WmQ2vX7bN4cTz8Hd",
"receipt_id": "rcpt_Gm4Tk8Wq2Nz6Lc3Vb7Xd9P",
"receipt_url": "https://morzepay.com/r/9a8b7c6d5e4f30211a2b3c4d5e6f7a8b",
"expires_at": "2026-10-29T09:00:23+03:00",
"completed_at": "2026-10-28T09:03:40+03:00",
"created_at": "2026-10-28T09:00:23+03:00",
"payments": [
{
"id": "bpay_Hq8Nw3Lk2Vx7Rt4Bm9Pc6D",
"object": "payment",
"status": "success",
"amount": "14000.00",
"customer_charged": "14000.00",
"payer": {
"name": "John Okello",
"email": null,
"phone": "+256771234567"
},
"transaction_id": "txn_Rk3Lp9WmQ2vX7bN4cTz8Hd",
"receipt_id": "rcpt_Gm4Tk8Wq2Nz6Lc3Vb7Xd9P",
"receipt_url": "https://morzepay.com/r/9a8b7c6d5e4f30211a2b3c4d5e6f7a8b",
"failure_reason": null,
"created_at": "2026-10-28T09:03:12+03:00",
"settled_at": "2026-10-28T09:03:40+03:00"
}
]
}
}{
"success": false,
"error": {
"code": "CHECKOUT_NOT_FOUND",
"message": "Checkout session not found."
},
"request_id": "req_6f1d0c2b9a8e7d6c5b4a"
}