Step 2: Create Payment Request
Initiate a payment request to link a card to the customer.
Endpoint Information
Name: Create Payment Request (With Token)
Method: POST
URL: {{base_url}}/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
Content-Type: application/json
{
"customerToken": "56f74d8274c1cb387e1ad24895905c18",
"reference": "1XYOCJXEBFQ9",
"merchantAccountId": "{{your_account_no}}",
"currency": "USD",
"amount": "50",
"webhookUrl": "https://webhook.site/b4d48b6d-f965-4bf8-b1bd-180248c6922e"
}
Response
Success Response
{
"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"
}
}