Quickstart
This takes about five minutes. You need four things from your account manager (or from Get set up once your sandbox access is approved):
| Value | What it is |
|---|---|
baseUrl |
The gateway address, as given by your account manager |
merchantIdentifier |
Your merchant id, 20 to 40 characters |
apiKey |
Your secret key |
midName |
The processing account (MID) your payments run on |
-
Check the gateway is up. No key needed.
Terminal window curl $BASE_URL/health -
Create a payment.
Terminal window curl -X POST $BASE_URL/api/payment-process \-H "x-api-key: $API_KEY" \-H "Content-Type: application/json" \-d '{"merchantIdentifier": "'$MERCHANT_ID'","midName": "'$MID_NAME'","referenceCode": "ORDER-2026-000123","amount": "10.00","currency": "USD","ccn": "4111111111111111","expMonth": "12","expYear": "2030","cvcCode": "123","email": "buyer@example.test","firstName": "Test","lastName": "Buyer","postbackUrl": "https://shop.example.com/payments/postback"}'const res = await fetch(`${BASE_URL}/api/payment-process`, {method: 'POST',headers: { 'x-api-key': API_KEY, 'Content-Type': 'application/json' },body: JSON.stringify({merchantIdentifier: MERCHANT_ID,midName: MID_NAME,referenceCode: 'ORDER-2026-000123',amount: '10.00',currency: 'USD',ccn: '4111111111111111',expMonth: '12',expYear: '2030',cvcCode: '123',email: 'buyer@example.test',firstName: 'Test',lastName: 'Buyer',postbackUrl: 'https://shop.example.com/payments/postback',}),});const payment = await res.json();if (!res.ok) throw new Error(`${payment.status} ${payment.details}`);import requestsres = requests.post(f"{BASE_URL}/api/payment-process",headers={"x-api-key": API_KEY},json={"merchantIdentifier": MERCHANT_ID,"midName": MID_NAME,"referenceCode": "ORDER-2026-000123","amount": "10.00","currency": "USD","ccn": "4111111111111111","expMonth": "12","expYear": "2030","cvcCode": "123","email": "buyer@example.test","firstName": "Test","lastName": "Buyer","postbackUrl": "https://shop.example.com/payments/postback",},timeout=30,)payment = res.json()res.raise_for_status()$ch = curl_init("$baseUrl/api/payment-process");curl_setopt_array($ch, [CURLOPT_POST => true,CURLOPT_RETURNTRANSFER => true,CURLOPT_HTTPHEADER => ["x-api-key: $apiKey", "Content-Type: application/json"],CURLOPT_POSTFIELDS => json_encode(["merchantIdentifier" => $merchantId,"midName" => $midName,"referenceCode" => "ORDER-2026-000123","amount" => "10.00","currency" => "USD","ccn" => "4111111111111111","expMonth" => "12","expYear" => "2030","cvcCode" => "123","email" => "buyer@example.test","firstName" => "Test","lastName" => "Buyer","postbackUrl" => "https://shop.example.com/payments/postback",]),]);$payment = json_decode(curl_exec($ch), true);A decided payment answers at once:
{"transactionUuid": "caa8c25a-e7c1-490d-8d6","paymentUuid": "caa8c25a-e7c1-490d-8d6","type": "DEPOSIT","status": "APPROVED","amount": "10.00","currencyIso3": "USD","message": "01-Approved"}If
statusisIN PROGRESSand aredirectUrlis present, send the shopper there (3-D Secure). -
Look it up by the
referenceCodeyou chose.Terminal window curl -X POST $BASE_URL/payment-Lookup \-H "x-api-key: $API_KEY" -H "Content-Type: application/json" \-d '{"merchantIdentifier":"'$MERCHANT_ID'","referenceCode":"ORDER-2026-000123"}' -
Refund it (an
APPROVEDpayment, full amount, once) using thepaymentUuidfrom step 2.Terminal window curl -X POST $BASE_URL/payment-refund \-H "x-api-key: $API_KEY" -H "Content-Type: application/json" \-d '{"merchantIdentifier":"'$MERCHANT_ID'","paymentUuid":"<paymentUuid>"}'
- Keep card numbers off your server with the hosted checkout.
- Handle the final result with a postback.
- Try more outcomes with the test cards.
- Learn what can go wrong in Errors.
- Prefer a GUI? Use the Postman collection.