Skip to main content
POST
/
v1
/
aggregators
/
{raast-aggregator-id}
/
payments
curl --request POST \
  --url https://api.getsafepay.com/raastwire/v1/aggregators/{raast-aggregator-id}/payments \
  --header 'Content-Type: application/json' \
  --header 'X-SFPY-AGGREGATOR-SECRET-KEY: <api-key>' \
  --data '
{
  "request_id": "c69aa27b-7b42-448b-af73-963bef1c5e42",
  "amount": 94000,
  "debitor_raast_id": "03202296111",
  "aggregator_merchant_identifier": "am_d7fd05ea-8613-4038-afd7-4275f29110f5",
  "order_id": "order_raast_id",
  "type": "RTP_NOW",
  "expiry_in_minutes": 100
}
'
{
  "api_version": "v1",
  "data": {
    "message": "RTP created successfully",
    "token": "pm_f531c5eb-5c49-40d6-8ac5-012cfd1b24c1",
    "msg_id": "IG2Y50ORB7BE2OLEW0HDVJUIP9QGTL1V6WS",
    "trace_reference": "aa22cc9b-3f55-4613-86cf-9641f11902d1",
    "uetr": "8df9cc1f-77b2-47e4-9a8b-a3050bee6972",
    "status": "P_REJECTED",
    "order_id": "NewPayNow1",
    "created_at": "2025-06-26T10:58:17Z"
  }
}

Authorizations

X-SFPY-AGGREGATOR-SECRET-KEY
string
header
required

Path Parameters

raast-aggregator-id
string
required

The unique identifier for the aggregator

Example:

"agg_2288490a-2176-4de5-b373-0ffb6f8e2e6e"

Body

application/json

Request to create an RTP Now or RTP Later

Base RTP creation payload shared across all debitor identifier options.

request_id
string
required

Client-supplied idempotency identifier for the RTP request.

amount
integer
required

Payment amount in the smallest currency unit (PKR).

aggregator_merchant_identifier
string
required

Identifier for the merchant on whose behalf the RTP is initiated.

order_id
string
required

Merchant order identifier associated with the RTP.

type
enum<string>
required

Indicates whether the RTP should be processed immediately or scheduled.

Available options:
RTP_NOW,
RTP_LATER
debitor_raast_id
string
required

Raast alias for the debitor (for example, a mobile number).

expiry_in_minutes
integer

Minutes until the RTP NOW request expires; must be between 1 and 180.

Required range: 1 <= x <= 180
expiry_in_days
integer

Days until the RTP LATER request expires; must be between 1 and 40.

Required range: 1 <= x <= 40

Response

Response envelope returned after a payment request is accepted.

Standard response structure for successful operations

api_version
string

The current version of the API spec

Example:

"v1"

data
object

Data returned when an RTP request is created successfully.