In this flow, you can save a card (0 amount tokenisation) and submit card details to our payment gateway using backend with your Custom payment form. You can also save a card with the first payment.
To receive a callback after the payment you have to set up callback URL in the Merchant portal under E-shop settings.

1. Initiate a one-off payment.
POST – https://igw-demo.every-pay.com/api/v3/payments/oneoff
Authorization – HTTP Basic Auth
Headers Key:
     o Content-Type ; Value – application/json
Body

{
"api_username": "xxxxxxxxx",
"account_name": "EUR3D1",
"amount": 0,
"order_reference": "test_payment1",
"nonce": "nonce12313131321",
"timestamp":"2020-03-11T10:15:04+00:00" ,
"email": "user@example.com",
"customer_ip": "1.2.3.4",
"customer_url":"https://shop.example.com/cart",
"locale":"EN",
"token_agreement": "unscheduled",
"request_token": true,
"mobile_payment": true
}
Your API username, from General settings.

nonce -Should be a unique value for each request.
timestamp – Should be exact time when initiating a request.

 

 

URL where Customer will be redirected after payment.
token_agreement – Fixed or variable amount, fixed or variable frequency.
request_token – To save card details for MIT and CIT.
mobile_payment – used by SDKs to set card details.

2. In response, you will receive a mobile_access_token which you have to use to submit card details.
!NB! You should never store card details on Customers device or your server. After submitting card details, they should be deleted! For further payments, you should use cc_token for MIT or CIT.
3. To submit card details, you can use your Custom payment form.
POST – https://igw-demo.every-pay.com/api/v3/mobile_payments/card_details
Headers Key:
     o Content-Type ; Value – application/json
• Authorization Bearer mobile_access_token from one-off response (example, Bearer aa280c8fbd20c867dcd26df6xxxb5e66b78c7ce9d )

Body

{
"api_username": "xxxxxxxxxx",
"cc_details": {
"cc_number": "520474xxxxxx1002",
"month": "12",
"year": "2025",
"holder_name": "EveryPay",
"cvc": "xxx"
},
"token_consented": true,
"nonce": "wwwdad25ww67555",
"timestamp": "2020-03-19T09:40:13+00:00"
}
Your API username, from General settings.cc_number full card number

 

 

 

token_consented – checkbox in your payment form. nonce -Should be unique value for each request.
timestamp – Should be exact time when initiating a request.

4. After submiting card details if everything is correct you will receive a response:

{ "payment_state": "waiting_for_3ds_response", "processing_errors": null }

5. You should start to monitor payment link <payment_link>.json and open payment_link from one-off response in the browser. Customer will see bank authentification window. When <payment_link>.json state will change to processing_3ds you should close the browser and return back a Customer to your app and wait for our callback.

6.When you receive a callback you should request payment status using payment_reference from a callback
GET https://igw-demo.every-pay.com/api/v3/payments/payment_reference?api_username=7a40xxxb9b13d
Authorization – HTTP Basic Auth
Headers Key:
     o Content-Type ; Value – application/json
Body – empty
7. In payment status request you will receive a token which you can use for payments to MIT (Merchant initiated transactions) or CIT (Customer initiated transactions) endpoints.

in Integracijos dokumentacija
Ar šis straipsnis Jums buvo naudingas?