UAPAY - національний платіжний сервіс

C2A Complete - completion of debit initiation

A method for completing the initiation of debiting funds from the payer's card. Can be called after https://uapayua.atlassian.net/wiki/spaces/AC/pages/2612887576 ,the payment must be of type C2A and status WAITING_COMPLETE, and the transaction should be of type SEND and status NEEDS_COMPLETE. After this action, the debiting process from the acquirer's bank begins and payment may require confirmation (3DS or LOOKUP) from the payer (payment status OPEN and operation status NEEDS_CONFIRMATION), be successful (payment and transaction status FINISHED) or not (the status of the payment and transaction is REJECTED).

Request method - POST

Request path - /api/p2p/payments/c2a/complete

Parameters for forming the request body in JSON format

Key

Data type

Required?

Description

Example

Key

Data type

Required?

Description

Example

params.sessionId

string

yes

client session id

"445fb296-8653-4646-8475-5796c97d16ff"

params.paymentId

string

yes, one of these parameters: params.paymentId, params.operationId, or
params.externalId

payment id

"a85ee391-46ca-4766-b376-292bd7efbeea"

params.operationId

string

operation id

"bc3c95f1-bf2a-4e61-8c88-8444b1b4e014"

params.externalId

string

external id of the operation

"ad6cee7f-88ff-4090-ae38-8e6a0f260cd8"

params.device

object

yes

object with information about the payer's browser / device

{"acceptHeader":"*/*","ip":"91.137.205.117","colorDepth":24,"javaEnabled":false,"language":"en-US","screenHeight":864,"screenWidth":1536,"windowHeight":734,"windowWidth":1479,"time":"2021-10-07T14:55:52.832Z","timezoneOffset":-180,"userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.159 Safari/537.36"}

params.acsRedirectUrl

string

No

The URL to which the payer will be redirected after the completion of the ACS page script in case of confirmation of the payment by the payer using 3DS, no more than 255 characters

"https://client-domain.ua/order-redirect/12345"

data.cardFrom.pan

string

yes, either one parameter data.cardFrom.id
or both parameters data.cardFrom.pan and data.cardFrom.expiresAt

debit card number

The customer can use this option only with a PCI DSS certificate

"4111111111111111"

data.cardFrom.expiresAt

string

debit card validity period in YYYY-MM format

The customer can use this option only with a PCI DSS certificate

"2025-05"

data.cardFrom.id

string

debit card id
created in the UAPAY system

"06f9c6e4-90e4-4f1e-a12b-49f2f7e9c390"

data.cardFrom.securityCode

string

yes

CVV2/CVC2 debit card code

"111"

Request body examples

{ "params": { "sessionId": "445fb296-8653-4646-8475-5796c97d16ff", "paymentId": "a85ee391-46ca-4766-b376-292bd7efbeea", "device": { "acceptHeader": "*/*", "ip": "91.137.205.117", "colorDepth": 24, "javaEnabled": false, "language": "en-US", "screenHeight": 864, "screenWidth": 1536, "windowHeight": 734, "windowWidth": 1479, "time": "2021-10-07T14:55:52.832Z", "timezoneOffset": -180, "userAgent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.159 Safari/537.36" }, "acsRedirectUrl": "https://client-domain.ua/order-redirect/12345" }, "data": { "cardFrom": { "pan": "4111111111111111", "expiresAt": "2025-05", "securityCode": "111" } } }

or

{ "params": { "sessionId": "445fb296-8653-4646-8475-5796c97d16ff", "externalId": "ad6cee7f-88ff-4090-ae38-8e6a0f260cd8", "device": { "acceptHeader": "*/*", "ip": "91.137.205.117", "colorDepth": 24, "javaEnabled": false, "language": "en-US", "screenHeight": 864, "screenWidth": 1536, "windowHeight": 734, "windowWidth": 1479, "time": "2021-10-07T14:55:52.832Z", "timezoneOffset": -180, "userAgent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.159 Safari/537.36" }, "acsRedirectUrl": "https://client-domain.ua/order-redirect/12345" }, "data": { "cardFrom": { "id": "06f9c6e4-90e4-4f1e-a12b-49f2f7e9c390", "securityCode": "111" } } }

Response body parameters in JSON format

Key

Data type

Description

Example

Key

Data type

Description

Example

data.paymentId

string

payment id

"a85ee391-46ca-4766-b376-292bd7efbeea"

data.operationId

string

operation id

"bc3c95f1-bf2a-4e61-8c88-8444b1b4e014"

data.externalId

string

external id of the operation

"ad6cee7f-88ff-4090-ae38-8e6a0f260cd8"

data.key

string

CVV2/CVC2 decryption key

"3PufqdQdnySBxQyqC7FyjCGUH1yT1V4WkxY6FdrRY72u.l0qoodqe68941561263"

data.amount

number

payment amount, in kopecks

10000

data.commissionAmount

number

the amount of the payment commission from the payer, in kopecks

550

Example of a response body

{ "status": 1, "data": { "paymentId": "a85ee391-46ca-4766-b376-292bd7efbeea", "operationId": "bc3c95f1-bf2a-4e61-8c88-8444b1b4e014", "externalId": "ad6cee7f-88ff-4090-ae38-8e6a0f260cd8", "key": "3PufqdQdnySBxQyqC7FyjCGUH1yT1V4WkxY6FdrRY72u.l0qoodqe68941561263", "amount": 10000, "commissionAmount": 550 } }

 

UAPAY - національний платіжний сервіс
pay@uapay.ua