Prerequisites
{{aggregator_id}}and{{secret_key}}aggregator_merchant_identifierfor the merchant collecting funds- Debtor IBAN or Raast ID
Flow summary
Load merchant identifiers
Retrieve the
aggregator_merchant_identifier from the merchant creation response.Validate the debtor account
Use the account validation utilities to confirm the debtor details.
Create the RTP Later payment
Submit
POST /v1/aggregators/{{aggregator_id}}/payments with type: RTP_LATER and an expiry window.Set
{{base_url}} to https://dev.api.getsafepay.com/raastwire in Sandbox or https://api.getsafepay.com/raastwire in Production.RTP later
- Request Fields
- API Example
- Sample Response
UUID that keeps the scheduled Request To Pay idempotent.
Amount in paisa.
22000 equals PKR 220.00.Token returned when you created the merchant.
Merchant order reference used for reconciliation.
Set to
RTP_LATER.Approval window in days (1-40).
Provide when requesting via a Raast alias. One of the debtor identifiers must be supplied.
Use when you know the debtor’s IBAN instead of a Raast ID. One of the debtor identifiers must be supplied.
Reference a stored payment method for recurring requests. One of the debtor identifiers must be supplied.
Monitor status
Use webhooks as the primary source of truth. Polling is helpful for dashboards or fallback workflows.cURL
Webhook events to expect
payment.createdpayment.pending_authorizationpayment.authorizedpayment.completedpayment.settledpayment.rejectedpayment.failedpayment.voidedpayment.reversedpayment.refunded(if you issue refunds)payment.refund_partial(if you issue partial refunds)
payment.settled, mark the invoice paid. If the customer rejects, resend with a new request_id after you resolve the issue.
Troubleshooting
- Expired request - Regenerate the RTP with a fresh
request_idandexpiry_in_days. - No response yet - Offer manual refresh or status polling for long-lived requests.
- Duplicate payload - Reusing a
request_idwith different parameters returns an idempotency error; retry with the same body.