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

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Current »

This is a method for initiating a refund to the payer's card. As part of a successful write-off for a payment with a C2A status of FINISHED and a write-off operation with a SEND type of a FINISHED status, a return operation with a RETURN type and a NEEDS_COMPLETE status is created, and the C2A payment status changes to WAITING_COMPLETE. After that, you can perform the action Test C2A Reverse Complete - завершення ініціювання повернення or Test C2A Reverse Cancel - скасування ініціювання повернення .

If not one of the methods is called by the client within 1 hour, it will be called automaticallyTest C2A Reverse Cancel - скасування ініціювання повернення .

Request method - POST

Request path - /api/p2p/payments/c2a/reverse/initiate

Parameters for forming the request body in JSON format

Key

Data type

Obligated?

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

debit operation id

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

params.externalId

string

the external id of the write-off operation

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

params.reverseExternalId

string

yes

unique external return id in the client's system, which will be assigned to the created operation, no more than 255 characters

"3b604870-7361-4125-9a41-03c12e8bc31b"

Request body examples

{
  "params": {
    "sessionId": "445fb296-8653-4646-8475-5796c97d16ff",
    "paymentId": "a85ee391-46ca-4766-b376-292bd7efbeea",
    "reverseExternalId": "3b604870-7361-4125-9a41-03c12e8bc31b"
  }
}

or

{
  "params": {
    "sessionId": "445fb296-8653-4646-8475-5796c97d16ff",
    "externalId": "ad6cee7f-88ff-4090-ae38-8e6a0f260cd8",
    "reverseExternalId": "3b604870-7361-4125-9a41-03c12e8bc31b"
  }
}

Response body parameters in JSON format

Key

Data type

Description

Example

data.paymentId

string

payment id

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

data.reverseOperationId

string

return operation id

"2a01fd7c-f9ca-444e-a800-d6ce59b87e96"

data.reverseExternalId

string

the external id of the return operation

"3b604870-7361-4125-9a41-03c12e8bc31b"

Example of a response body

{
  "status": 1,
  "data": {
    "paymentId": "a85ee391-46ca-4766-b376-292bd7efbeea",
    "reverseOperationId": "2a01fd7c-f9ca-444e-a800-d6ce59b87e96",
    "reverseExternalId": "3b604870-7361-4125-9a41-03c12e8bc31b"
  }
}

  • No labels