Take the Payment

Send the customer's DCC choice with the card payment, in a single-stage or two-stage flow.

Once the customer has made a choice, send the card payment with their choice in isDccSelected. Whether you also send the quote ID depends on the choice and the flow.

The customerisDccSelectedglobalBlueIdCharged in
Accepts the offertrueRequired. It must be the ID from the lookup.The card's currency
Declines, two-stagefalseLeave it out. N-Genius takes it from the order.AED
Declines, single-stagefalseRequired, to record the decision.AED
Was not offered DCCLeave it outLeave it outAED

Set isDccSelected whenever you showed an offer. Declining needs no other call.

Two-stage: pay an existing order

PUT /transactions/outlets/{outletId}/orders/{orderRef}/payments/{paymentRef}/card

You can also use the payment:card link from the order you created. The card fields are the same as in Two-stage payments, with the DCC fields added.

curl --request PUT \
  'https://api-gateway.sandbox.ngenius-payments.com/transactions/outlets/<outlet_id>/orders/<order_reference>/payments/<payment_reference>/card' \
  --header 'Authorization: Bearer <access_token>' \
  --header 'Content-Type: application/vnd.ni-payment.v2+json' \
  --header 'Accept: application/vnd.ni-payment.v2+json' \
  --data '{
    "pan": "4111111111111111",
    "expiry": "2030-12",
    "cvv": "123",
    "cardholderName": "Test Cardholder",
    "isDccSelected": true,
    "globalBlueId": "b7e2d4f9-1a3c-4e8b-9f6d-2c8a5e1b4d7f"
  }'

To record that the customer declined, send "isDccSelected": false and leave out globalBlueId.

Single-stage: create and pay in one request

POST /transactions/outlets/{outletId}/payment/card

The order goes in order and the card in payment, as in One-stage payments. Use action PURCHASE, or SALE where your outlet supports it.

{
  "order": {
    "action": "PURCHASE",
    "amount": { "currencyCode": "AED", "value": 3000 }
  },
  "payment": {
    "pan": "4111111111111111",
    "expiry": "2030-12",
    "cvv": "123",
    "cardholderName": "Test Cardholder",
    "isDccSelected": true,
    "globalBlueId": "a3f8c2e1-7b4d-4f9a-9e2c-1d5b8a7f6e3c"
  }
}

To record that the customer declined, send "isDccSelected": false with the same globalBlueId.

The response

A successful payment returns HTTP 201. The top-level amount stays in AED, the order currency. What the customer was charged is in dccResponse.

{
  "reference": "<payment_reference>",
  "state": "PURCHASED",
  "amount": { "currencyCode": "AED", "value": 3000 },
  "forexConversionType": "DCC_GLOBAL_BLUE",
  "dccResponse": {
    "globalBlueId": "a3f8c2e1-7b4d-4f9a-9e2c-1d5b8a7f6e3c",
    "dccSelected": true,
    "transactionInfo": {
      "currencyCodeFrom": "AED",
      "currencyCodeTo": "USD",
      "amount": 3000,
      "convertedAmount": 817,
      "conversionRate": 0.2723,
      "minorUnit": 2,
      "markup": "3.99",
      "conversionDateTime": 1752969600000
    }
  }
}
FieldDescription
forexConversionTypeDCC_GLOBAL_BLUE whenever a DCC decision was recorded, whether the customer accepted or declined
dccResponse.dccSelectedtrue if the customer accepted, false if they declined
dccResponse.transactionInfoThe quote the payment used, in the same fields as the rate lookup

On an AUTH order the state is AUTHORISED, and the response carries the cnp:capture link. See Captures, voids and refunds.

Multi-currency pricing payment

If the customer picked a currency before entering their card, send the card payment with currency and no DCC fields. Do not request a DCC quote.

{
  "pan": "4929492949294929",
  "expiry": "2030-12",
  "cvv": "123",
  "cardholderName": "Test Cardholder",
  "currency": "USD"
}

The response carries the conversion in mcpResponse.

Next steps

© Network International LLC. All Rights Reserved.