Prerequisites
{{aggregator_id}}issued by Safepay{{secret_key}}for the target environment- A Raast merchant to link during merchant creation
Environments
| Environment | Base URL | Notes |
|---|---|---|
| Sandbox | https://dev.api.getsafepay.com/raastwire | Use for integration testing. Data resets periodically. |
| Production | https://api.getsafepay.com/raastwire | Live traffic. Requests require enabled merchants and approved KYC/KYB. |
Request an aggregator account
Email support@getsafepay.com with your business context. Safepay provisions an Aggregator, shares your
{{aggregator_id}}, and issues the first {{secret_key}}.Secure the aggregator secret key
Store
{{secret_key}} in your secret manager and scope access to your backend jobs only. Every Raast API request must send the header X-SFPY-AGGREGATOR-SECRET-KEY: {{secret_key}}.Link a merchant to a Raast merchant
Create an aggregator merchant with a unique
merchant_external_id, settlement iban, and a Raast merchant token. The response returns an aggregator_merchant_identifier you will use in every payment request.Trigger your first RTP payment
Use the Create RTP endpoint to request funds. Safepay sends status updates via webhooks.
Never ship
{{secret_key}} in client-side code. Rotate credentials immediately if exposed.Create your first merchant
Each merchant you manage must be linked to a Raast merchant. Set{{base_url}} to https://dev.api.getsafepay.com/raastwire in Sandbox or https://api.getsafepay.com/raastwire in Production.
Persist
data.token; Safepay uses it as the aggregator_merchant_identifier in subsequent payment, QR, and payout calls.Make a payment request
Once Safepay enables the merchant, create a Request-to-Pay (RTP) using the same credentials. Reuse{{base_url}} for the target environment. The example below demonstrates an RTP Now payment that immediately prompts the customer.
request_id when network errors occur.