Step 2: Create Payment Request
Use the customer token from Step 1 to initiate a payment. This returns a secure payment URL for the user to complete the payment.
Endpoint
POST /api/v1/payment/request
Description
Use the customerToken obtained in Step 1 to initiate a payment. This transaction is necessary to capture and tokenize the card details for future withdrawals.
Request Body
{
"customerToken": "56f74d8274c1cb387e1ad24895905c18",
"reference": "1XYOCJXEBFQ9",
"merchantAccountId": "{{your_account_no}}",
"currency": "USD",
"amount": "50",
"webhookUrl": "https://your-webhook-url.com"
}
Response Example
{
"success": true,
"message": "Payment Request Accepted",
"data": {
"payment_url": "https://sgw.paymid.com/secure-checkout/ef65e8ff-4768-4fc5-bd34-c549d9414222",
"reference": "1XYOCJXEBFQ9",
"session_id": "ef65e8ff-4768-4fc5-bd34-c549d9414222"
}
}