πΈRequest a Payment
Use Payment Links or the Swapped Pay API to create orders

Merchants can create a payment link via the dashboard or API. Orders are pending until a payment is detected on-chain.
Request a Payment via Dashboard
From your account, navigate to the Payment Links section. Once there, click the "Create Payment Link" button in the top right. Then simply fill out the information for the payment:
Name: The payment title that will be visible to customers using the payment link.
Internal Note (Description): This field will not be visible to end-customers, and can be used as an internal note for any purpose.
Image (Optional): An image/icon that will be visible to customers using the payment link, and when receiving payment completed emails.
Currency: The fiat currency to be displayed on the payment link
Note: You can select any fiat currency when creating a payment link; however, your Swapped Pay account will only denominate in 1 base fiat currency. For example, you can create payment links in 20+ currencies, but you'll only be able to settle and withdraw 1 single fiat currency.
Amount: The amount of fiat currency to charge a customer.
Request a Payment via API
Create a payment order
Successful
POST /v1/orders HTTP/1.1
Host: pay-api.swapped.com
X-API-Key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 227
{
"purchase": {
"name": "text",
"description": "text",
"imageUrl": "text",
"price": "text",
"currency": "USD"
},
"metadata": {
"externalId": "text",
"userId": "text",
"userCountry": "text",
"userName": "text",
"userEmail": "text",
"redirectUrl": "text"
}
}
Successful
{
"data": {
"order": {
"id": "text",
"externalId": "text",
"link": "text",
"userId": "text",
"merchant": {
"id": "text"
},
"quote": {
"fromAmount": {
"amount": "text",
"currency": {
"id": "text",
"symbol": "text",
"precision": 1,
"type": "FIAT",
"flows": [
"PAYMENT"
],
"blockchain": {
"id": "text",
"name": "text"
}
}
},
"toAmount": {
"amount": "text",
"currency": {
"id": "text",
"symbol": "text",
"precision": 1,
"type": "FIAT",
"flows": [
"PAYMENT"
],
"blockchain": {
"id": "text",
"name": "text"
}
}
},
"exchangeRateSnapshotId": "text"
},
"depositAddress": {
"id": "text",
"address": "text",
"available": true,
"memo": "text",
"supportedCurrencies": [
{
"name": "text",
"officialId": "text",
"type": "FIAT",
"symbol": "text",
"precision": 1,
"flows": [
"PAYMENT"
],
"blockchainId": "text",
"isStablecoin": true,
"decimals": 1,
"isNative": true,
"id": "text"
}
]
},
"createdAt": "text",
"expiresAt": "text",
"status": "PENDING_USER_CREATION",
"purchase": {
"id": "text",
"name": "text",
"description": "text",
"imageUrl": "text",
"price": "text",
"currency": {
"name": "text",
"officialId": "text",
"type": "FIAT",
"symbol": "text",
"precision": 1,
"flows": [
"PAYMENT"
],
"blockchainId": "text",
"isStablecoin": true,
"decimals": 1,
"isNative": true,
"id": "text"
},
"rateMerchantOverOrder": "text"
},
"payments": [
{
"id": "text",
"orderId": "text",
"receivedAmount": "text",
"receivedCurrency": {
"name": "text",
"officialId": "text",
"type": "FIAT",
"symbol": "text",
"precision": 1,
"flows": [
"PAYMENT"
],
"blockchainId": "text",
"isStablecoin": true,
"decimals": 1,
"isNative": true,
"id": "text"
},
"txHash": "text",
"confirmedAt": "text",
"status": "text",
"createdAt": "text"
}
],
"updates": [
{
"id": "text",
"message": "text",
"entityType": "text",
"authorId": "text",
"metadata": {},
"timestamp": "text"
}
],
"metadata": {
"externalId": "text",
"userId": "text",
"userName": "text",
"userCountry": "text",
"userEmail": "text",
"redirectUrl": "text"
}
}
},
"message": "text",
"success": true
}
Use this endpoint to initiate a crypto payment request. If successful, a unique paymentUrl
is returned in the response; this can be embedded in an iframe or used as a redirect link.
Pass metadata.userName
and metadata.userEmail
to allow users to bypass the step of entering this information during the payment flow.
If a redirectUrl
is included in your request, the end-customer will be automatically redirected back to your site after their payment is confirmed on-chain.
Customers will also have the option to return early via a provided button on the payment screen.
POST /api/orders
Response
{
url: "https://pay.swapped.com/SP-1112222
}
Last updated