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.
Set
{{base_url}} to https://dev.api.getsafepay.com/raastwire in Sandbox or https://api.getsafepay.com/raastwire in Production.RTP now
- Request Fields
- API Example
- Sample Response
UUID that enforces idempotency. Reuse only when retrying the exact same payload.
Amount in paisa (PKR minor units).
94000 represents PKR 940.00.Token returned in
data.token when you created the merchant.Merchant reference echoed in responses and webhooks.
Must be
RTP_NOW for immediate Request To Pay flows.Required for RTP Now payments. Valid range 1-180 minutes.
Provide when charging a known IBAN. At least one of
debitor_iban, debitor_raast_id, or debitor_vault_token must be supplied.Supply when requesting payment via a Raast alias (for example, phone number). One of the debtor identifiers is required.
Reference to a stored payment method for repeat customers. One of the debtor identifiers is required.
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)
Troubleshooting
- Invalid debtor details - Use the validation utilities before sending the RTP.
- Expired request - Regenerate the RTP with a fresh
request_idandexpiry_in_minutes. - Duplicate payload - Reusing a
request_idwith different parameters returns an idempotency error; retry with the same body.