International Gateway
Card-not-present (CNP) acceptance via Cybersource. Accept Visa, Mastercard, Amex from 80+ countries. 3DS2 challenge flows handled automatically.
How it works
- 1
Tokenise the card
POST to/v1/payment_methodswithtype=cardand the raw card fields. This returns apm_token. Your servers only ever handle the token — the raw PAN never touches your infrastructure again. - 2
Create a PaymentIntent
POST to/v1/payment_intentswithprovider=cybersource_cnp, thepayment_methodtoken, and the charge amount. Passsetup_future_usage=off_sessionif you plan to charge the card again without the cardholder present. - 3
3DS2 challenge (if required)
If the issuer requires authentication,next_action.typeisthree_d_secure. Redirect the customer tonext_action.redirect_url. MerasPay hosts the 3DS challenge flow and handles the ACS callback. - 4
Customer completes challenge
The cardholder authenticates with their issuing bank on the 3DS page. MerasPay receives the authentication result and passes it to Cybersource. - 5
Intent transitions automatically
After authentication (or immediately if 3DS was not required), Cybersource authorises the charge and MerasPay transitions the intent tosucceeded. No confirm call is needed for the 3DS path. - 6
Receive the webhook
payment_intent.succeededfires on your webhook endpoint. Use this as the authoritative fulfillment signal.
Endpoints
/v1/payment_methodsTokenise a card — returns a reusable pm_ token.
/v1/payment_intentsCreate a CNP charge using provider=cybersource_cnp.
/v1/payment_intents/{id}Poll intent status (use webhooks in production).
/v1/payment_intents/{id}/cancelCancel a pending authorisation.
The International Gateway uses the same PaymentIntents API as domestic rails. Pass provider=cybersource_cnp — no separate endpoint set.
Tokenise a card
| Name | Type | Description |
|---|---|---|
typerequired | enum | card |
card[number]required | string | PAN — 13–19 digits, no spaces. |
card[exp_month]required | integer | 1–12. |
card[exp_year]required | integer | Four-digit year, e.g. 2029. |
card[cvc]required | string | 3–4 digit card verification code. |
billing_details | object | Optional { name, email, address }. Improves auth rates and required for AVS checks. |
The returned pm_ token is reusable — store it against the customer for future charges.
3DS2 next_action shape
When the intent requires 3DS authentication, the create response contains:
{
"type": "three_d_secure",
"redirect_url": "https://3ds.merashub.com/auth/pi_01J4KM...",
"return_url": "https://yourapp.com/checkout/return"
}Redirect the customer to redirect_url. After the challenge, MerasPay redirects the cardholder to return_url and the intent transitions server-side. Poll or listen for the webhook — do not rely solely on the return redirect.
Supported cards and currencies
Card networks
- Visa
- Mastercard
- American Express
- Diners Club
- JCB (via Cybersource routing)
Settlement currencies
USDUS DollarEUREuroGBPPound SterlingAEDUAE DirhamSARSaudi RiyalDJFDjibouti Franc
Test cards
| Card number | Network | Behaviour |
|---|---|---|
4111111111111111 | Visa | Charge succeeds immediately — no 3DS. |
4000000000000002 | Visa | Charge declined. intent transitions to canceled. |
4000000000003220 | Visa | 3DS challenge required. Use any OTP to pass. |
5500005555555559 | Mastercard | Charge succeeds immediately. |
371449635398431 | Amex | Charge succeeds immediately. |
Use any future expiry date, CVC 123 (or 1234 for Amex), and any billing postcode in sandbox.
Example — card payment with pm_ token
curl -X POST https://api.merashub.com/v1/payment_methods \
-H "Authorization: Bearer sk_test_..." \
-H "Content-Type: application/json" \
-d '{
"type": "card",
"card": {
"number": "4111111111111111",
"exp_month": 12,
"exp_year": 2029,
"cvc": "123"
},
"billing_details": {
"name": "Amina Hassan",
"email": "amina@example.com"
}
}'{
"id": "pm_01J5RQ2XVZB3RN4TQ8E7PWCARD",
"type": "card",
"card": {
"brand": "visa",
"last4": "1111",
"exp_month": 12,
"exp_year": 2029,
"funding": "credit"
},
"billing_details": {
"name": "Amina Hassan",
"email": "amina@example.com"
},
"created_at": "2026-05-25T10:00:00Z"
}curl -X POST https://api.merashub.com/v1/payment_intents \
-H "Authorization: Bearer sk_test_..." \
-H "Idempotency-Key: order_7791" \
-H "Content-Type: application/json" \
-d '{
"amount": 12000,
"currency": "USD",
"provider": "cybersource_cnp",
"payment_method": "pm_01J5RQ2XVZB3RN4TQ8E7PWCARD",
"description": "Order #7791"
}'{
"id": "pi_01J5RQ9ABCDE4TM5FW9E2VKCNP",
"status": "succeeded",
"amount_minor": 12000,
"currency": "USD",
"provider": "cybersource_cnp",
"payment_method": "pm_01J5RQ2XVZB3RN4TQ8E7PWCARD",
"fraud_details": {
"decision": "ACCEPT",
"score": 14
},
"succeeded_at": "2026-05-25T10:00:02Z"
}Recurring charges and 3DS exemptions
pm_) and set setup_future_usage=off_session on the initial intent. Subsequent charges pass the stored credential flag to Cybersource, and the issuer may grant a 3DS exemption — reducing friction for your customers on repeat payments.Risk and fraud screening
fraud_details field on the intent object — decision is one of ACCEPT, REVIEW, or REJECT. Contact support to tune Decision Manager rules for your business.