Prerequisites
{{aggregator_id}}and{{secret_key}}aggregator_merchant_identifierfor the merchant collecting funds- Debtor IBAN or Raast ID
Flow summary
1
Load merchant identifiers
Retrieve the
aggregator_merchant_identifier from the merchant creation response.2
Validate the debtor account
Use the account validation utilities to confirm the debtor details.
3
Create the RTP Now payment
Call
POST /v1/aggregators/{{aggregator_id}}/payments with type: RTP_NOW.4
Track the outcome
Use webhooks (and optional polling) to surface the final payment status.
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
string
required
UUID that enforces idempotency. Reuse only when retrying the exact same payload.
integer
required
Amount in paisa (PKR minor units).
94000 represents PKR 940.00.string
required
Token returned in
data.token when you created the merchant.string
required
Merchant reference echoed in responses and webhooks.
string
required
Must be
RTP_NOW for immediate Request To Pay flows.integer
Required for RTP Now payments. Valid range 1-180 minutes.
string
Provide when charging a known IBAN. At least one of
debitor_iban, debitor_raast_id, or debitor_vault_token must be supplied.string
Supply when requesting payment via a Raast alias (for example, phone number). One of the debtor identifiers is required.
string
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.