Skip to content

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
  1. Check the gateway is up. No key needed.

    Terminal window
    curl $BASE_URL/health
  2. 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"
    }'

    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 status is IN PROGRESS and a redirectUrl is present, send the shopper there (3-D Secure).

  3. Look it up by the referenceCode you 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"}'
  4. Refund it (an APPROVED payment, full amount, once) using the paymentUuid from 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>"}'