Sync Payment
Use Cases
Sync Payment - Single one-shot payment
Use Payment/CreateSyncPayment call
- Populate merchantId
- Optionally populate accountid if you want to force a particular account
- Populate Currency ex EUR
- Populate amount ex 1.00
- Create a merchantRef - must be unique - suggest Guid
- Enter cardholder details
- Enter card details in cardData
- Populate AuthorisationType depending on your use case
- Preauth - Auth
- Preauth and Capture - AuthCapture
- Recurrence - OneTime
- WebHooks - suggest population of completed and approved webhooks to receive server-to-server call when payment completed
- Initiation - set to CIT
- ReturnUrl - enter a valid url to redirect cardholder at the end of the payment
- ThreeDSData - see External 3DS - most payment providers require 3DS
The above will create a single one-shot payment and return its response
Tip
See Payment Actions for further actions possible on completed sync payment
request:
{
"initiation": "CIT",
"merchantId": "dbdab964-82ee-4b09-a26b-68403c31afa7",
"currency": "EUR",
"amount": 1.0,
"merchantRef": "d4d12eb7-ca78-4158-9e5a-269646eafd20",
"cardHolder": {
"email": "conradmicallef@gmail.com",
"name": "test user"
},
"cardData": {
"cardNo": "4000000000000002",
"expiryYear": "30",
"expiryMonth": "12",
"cvc": "123"
},
"authorisationType": "AuthCapture",
"recurrence": "OneTime"
}
response:
{
"paymentId": "8bea8040-dee7-441c-a35f-d6ce47d6c7f3",
"merchantId": "dbdab964-82ee-4b09-a26b-68403c31afa7",
"accountId": "81de44cb-4b70-4207-9f5e-54355491a5cc",
"currency": "EUR",
"amount": 1,
"cardData": {
"maskedPAN": "400000*0002",
"expiryYYMM": "3012"
},
"result": {
"status": "Approved",
"processorId": "eea02b23-9069-4f95-85a3-9a28ad7b97c7",
"message": "Dummy success",
"authCode": "123456"
},
"merchantRef": "d4d12eb7-ca78-4158-9e5a-269646eafd20"
}
Fields without a value are left out of responses and webhooks. A OneTime payment does not return a token: to keep the card for later use register it with recurrence OneClick (see Agreements and Token service). A merchant initiated payment (MIT) is only valid with recurrence Recurring or Unscheduled, see the table below.
Zero amount: a card check
amount may be 0. A zero amount payment is a card check: the card is verified (and, when 3D Secure applies, authenticated) and nothing is charged. It works with every recurrence; combined with the agreement object and recurrence OneClick it registers an agreement exactly as a payment would (see Agreements), which is how a card is saved without charging it.
- A negative amount is rejected (
PAB02). - A zero amount payment is routed only to processors that were verified for zero value payments. This is a capability of the processor (
SupportsZeroAmount, off until the acquirer confirmed it and it was tested). When none of your accounts qualifies the request is rejected withRTE03as soon as you create it (sync, async and hosted). - It cannot be captured, refunded or voided (
PRO30). - On the hosted page the button reads Approve instead of Pay.
Initiation and recurrence: which combinations are valid
Every sync payment states who started it (initiation) and what kind of payment it is (recurrence). Only the combinations below are accepted; the others are rejected before the payment is processed.
| initiation | recurrence | Valid | Use |
|---|---|---|---|
CIT |
OneTime |
yes | The normal payment, also a returning customer paying with a stored token |
CIT |
OneClick |
yes | The registering payment: customer present, 3D Secure with a mandated challenge, the card is stored and a token is returned |
CIT |
Scheduled |
yes | The registering payment of a scheduled agreement (async and hosted with agreement.schedule, see Agreements); not available on sync payments, which have no agreement object |
CIT |
Recurring, Unscheduled |
yes | Customer present payment of an existing arrangement |
MIT |
Recurring |
yes | Merchant initiated payment of a scheduled arrangement (needs a token and its traceId) |
MIT |
Unscheduled |
yes | Merchant initiated payment of an unscheduled arrangement (needs a token and its traceId) |
MIT |
OneTime |
no | VAL08: a merchant initiated payment is always part of an arrangement |
MIT |
OneClick |
no | VAL08: use Unscheduled or Recurring |
MIT |
Scheduled |
no | VAL08: Scheduled registers the agreement with the cardholder present, charge it with Recurring |
MOTO |
OneTime |
yes | Keyed order (the merchant account must support MOTO) |
MOTO |
any other | no | VAL08: a MOTO payment must be OneTime |
Note
MIT and MOTO are only for sync payments. On async and hosted payments the cardholder is always present, so initiation must be CIT; anything else is rejected with VAL13.
Note
A sync payment does not register an agreement yet (there is no agreement object on sync payments). A sync payment with recurrence OneClick still returns a token as before; record consent for it afterwards with Agreement/RecordConsent. On a later payment with a token you may send agreementId, see Payment Actions.