Simulate rejection of a payment request

POST /v2/rtp/{id}/test-reject

Simulates the customer rejecting an RTP in the sandbox environment. Use it to test decline flows and error handling on the merchant side, without real payments.


Request

HTTP Method: POST Endpoint:

/v2/rtp/{id}/test-reject

Headers

Authorization: Bearer {access_token}
Content-Type: application/json

Test RTP simulation is allowed only in sandbox.

Path Parameters

Parameter
Type
Required
Description

rtpId

string (GUID)

Yes

RTP unique identifier (rtpId).


Response

Response Parameters

Field
Type
Description

result

object

Response result object.

result.rtpId

string (GUID)

RTP unique identifier.

result.status

string (enum)

RTP status (Pending, Accepted, Rejected, Expired, Cancelled, Refunded).

result.orderId

string (100)

Merchant-side order identifier.

result.payId

string (GUID)

Payment unique identifier.

result.amount

number (decimal)

Payment amount.

result.commission

number (decimal)

Payment commission.

result.currency

string (enum)

Payment currency (MDL).

result.payerName

string (200)

Payer abbreviated name.

result.payerIban

string (100)

Payer IBAN.

result.executedAt

string (datetime, ISO 8601-1:2019)

Timestamp when the payment was executed.

result.signature

string

Notification validation signature.

ok

boolean

Request processing status (true on success).

errors

array

Present only if ok = false.

errors.errorCode

string

Error code.

errors.errorMessage

string

Error description.

Example Successful Response

{
  "result": {
    "rtpId": "123e4567-e89b-12d3-a456-426614174000",
    "rtpStatus": "Active",
    "orderId": "123",
    "payId": "6d24e4a5-c6bf-4d3e-bf7a-8d2123faf4e9",
    "amount": 10,
    "commission": 2.50,
    "currency": "MDL",
    "payerName": "John D.",
    "payerIban": "MD88AG000000011621810140",
    "executedAt": "2024-11-29T10:56:52.1380956+00:00",
    "signature": "592b6999-fdd0-4fd3-9708-5cb9df590dee"
  },
  "ok": true
}

Notes

  • Use this endpoint to simulate declines and verify your application reacts appropriately (e.g., show failure states, do not fulfill the order).

Last updated