Skip to main content

Payment Request Using Customer Token

Process a payment using a saved customer token (tokenized card).

Endpoint Information

Name: Payment Request Using Customer Token
Method: POST
URL: {{BASE_URL}}/api/v1/payment/request

Description

This endpoint allows you to charge a returning customer using their saved payment method (token) without requiring them to re-enter card details.

Authentication

Type: Basic Auth

  • Username: App Key
  • Password: Secret Key

Request Body

Content-Type: application/json

{
"customerToken": "f0a8c83a1d4457b840b4376b9657b48e",
"reference": "1XYOCJXEBFQ6",
"merchantAccountId": "{{your_account_no}}",
"currency": "USD",
"amount": "25",
"ttl": "10",
"tagName": "XYOCJXEBF",
"webhookUrl": "https://webhook.site/c31acfce-9887-4b29-b2f2-8aad83139c8c"
}

Key Parameters

ParameterTypeRequiredDescription
customerTokenstringYesThe saved customer token representing the card
referencestringYesUnique transaction reference
amountnumberYesPayment amount
currencystringYesCurrency code (ISO 4217)

Response

Success Response

{
"success": true,
"message": "Payment Request Accepted",
"data": {
"payment_url": "https://sgw.paymid.com/secure-checkout/ab886b31-88bd-46fe-bec6-75f6b44f941b",
"reference": "1XYOCJXEBFQ6"
}
}

Usage

  1. Obtain Token: Get the customerToken from a previous successful payment or customer registration.
  2. Make Request: Send this request with the token.
  3. Redirect: Redirect the user to the payment_url (usually for 3DS verification if required, or instant success).

Example Screenshot

Payment with Token