Token Payment
Process one-time payments using an existing payment token. This endpoint allows merchants to charge customers without creating subscriptions, using the securely stored payment information in the token.
subscriptions.write
scope.Authorizations
Bearer authentication header in the format `Bearer <token>`, where `<token>` is your authentication token.
Headers
Merchant account ID for this request.
"default"
Unique key to ensure request idempotency. If provided, identical requests will not be processed multiple times.
"unique-key-123"
Original IP address of the client connecting to the server.
"203.0.113.195"
Body
application/jsonPayment amount in cents (smallest currency unit).
"1000"
"2999"
Payment currency (ISO 4217 format).
"USD"
"EUR"
Merchant reference identifier for this payment. Used to identify the payment in your system.
"payment-12345"
Description of the payment.
"One-time payment using token"
Custom key-value pairs for additional information.
"{"campaign": "summer_promotion", "source": "website"}"
Response
Successful Response
Unique payment identifier.
"pay_1234567890abcdef"
Object type, always "payment".
"payment"
Token ID used for this payment.
"tok_a1b2c3d4"
Payment amount in cents.
"1000"
Payment currency.
"USD"
Payment status: succeeded, failed, processing.
"succeeded"
"failed"
Merchant reference identifier for this payment.
"payment-12345"
Payment creation time (ISO 8601).
"2025-08-12T09:00:00Z"
Customer information from the token.
Payment method information from the token.
Payment description.
"One-time payment using token"
Custom metadata.
"{}"
curl --request POST \--url https://api.efundpay.com/v4/tokens/{token_id}/payment \--header 'Authorization: Bearer <token>' \--header 'x-merchant-account-id: <x-merchant-account-id>' \--header 'Content-Type: application/json' \--header 'idempotency-key: unique-key-123' \--header 'X-Forwarded-For: 203.0.113.195' \--data '{"amount": 1000,"currency": "USD","external_identifier": "payment-12345","description": "One-time payment using token","metadata": {"campaign": "summer_promotion","source": "website"}}'
{"id": "pay_1234567890abcdef","object": "payment","token_id": "tok_a1b2c3d4","amount": 1000,"currency": "USD","status": "succeeded","external_identifier": "payment-12345","created": "2025-08-12T09:00:00Z","customer": {"display_name": "John Doe","external_identifier": "customer-12345","first_name": "John","last_name": "Doe","email_address": "john@example.com","phone_number": "+1234567890"},"payment_method": {"type": "card","card": {"last4": "1111","expiration_date": "12/27"}},"description": "One-time payment using token","metadata": {"campaign": "summer_promotion","source": "website"}}