Step 2: Receive Outbound Request-To-Pay Response
Overview
This operation communicates the status of a prior request-to-pay initiated by your customer, as populated in the status.status
field.
As the status of the RTP changes during the transaction life cycle, you may receive a new unsolicited outboundRequestToPayResponse
with each new status update of the request-to-pay. As an example, an outboundRequestToPayResponse
may indicate, at different points during the same transaction, that a request-to-pay:
- Is pending (must still be presented to the debtor).
- Has been presented to the debtor.
- Has already been paid or has failed for some reason.
If the partner is unsure of the status of an outboundRequestToPay
, an outboundRequestToPayStatusRequest may be used to solicit an up-to-date outboundRequestToPayResponse
.
Implementing the API
Receive Outcome
Electrum sends an outboundRequestToPayResponse
message to your /transactions/outbound/request-to-pay-response
endpoint.
The full message schema can be found in the API reference documentation. Code and payload samples are shown below.
- Partner API sandbox
https://example.com/path/payments/partner-api/v1/transactions/outbound/request-to-pay-response
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://example.com/path/payments/partner-api/v1/transactions/outbound/request-to-pay-response \
-H 'Content-Type: application/json' \
-H 'traceparent: string' \
-H 'tracestate: string' \
-d '{
"status": {
"status": "PRESENTED"
},
"schema": "RequestToPayResponse",
"messageIdentifiers": {
"messageIdentification": "89730ee05e184fb094cf27cec5078d6b",
"creationDateTime": "2022-05-04T03:02:02Z"
},
"originalMessageIdentifiers": {
"messageIdentification": "8fd51c7124ba4819b9253e296a68e1da",
"creationDateTime": "2022-05-04T03:02:01Z"
},
"transactionIdentifiers": {
"endToEndIdentification": "6249118655591098",
"transactionIdentification": "RRN000000001",
"uetr": "f27a34ad-c5ab-4b70-a3f9-946d743eaeaa"
},
"requestToPayConditions": {
"minAmount": {
"value": 100,
"currency": "ZAR"
},
"maxAmount": {
"value": 100,
"currency": "ZAR"
}
}
}'
No content
Respond With Success
If you receive the message successfully and are able to process it, then respond with an HTTP 202
status. Process the message as per Step 3.
Respond With An Error
If you experience an error while handling the request and are unable to submit it for asynchronous processing, then respond with an appropriate error response.