Skip to main content

Overview

Card payments use hosted checkout. Simply redirect the user to the payment_url from the API response, and card input through 3D Secure authentication is handled automatically.

Payment Flow

1

Create Payment

Call POST /v1/payments to create a payment and obtain payment_url
2

Redirect

Redirect user to payment_url
3

Payment Complete

After payment, user is automatically redirected to your configured success_redirect_url or failure_redirect_url — or to the success_url / failure_url you passed on this payment

Implementation Example

Redirect URLs

By default the customer returns to the URLs configured for your account in the merchant dashboard. To send a specific payment somewhere else — for example when you run two separate forms on one account — pass the URLs when creating the payment:
Each field is optional and falls back to your dashboard default when omitted. ZAFA PAY appends request_id, transaction_id, and status to the URL as query parameters:
URLs must use http or https. These work for every checkout type, including crypto payments.
A redirect confirms only that the customer returned to your site. Always treat the webhook or a Get Payment API call as the source of truth before fulfilling an order.

Authorization & Capture

For two-step payments (authorize first, capture later):

Test Cards

For complete API parameters and response details, see the Create Payment API reference.