Skip to main content
POST
/
api
/
pay
Execute a universal outbound payment
curl --request POST \
  --url https://mag3nt.com/api/pay \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "card_id": "sx_a66a6666-...",
  "card_token": "tok_3b9fe670-...",
  "url": "https://api.weather.com/forecast"
}
'
{
  "success": true,
  "transaction_id": "<string>",
  "amount_debited": 123,
  "merchant_amount": 123,
  "platform_fee": 123,
  "token": "<string>",
  "network": "<string>",
  "protocol": "<string>",
  "settlement": {
    "status": "<string>",
    "tx_hash": "<string>"
  }
}

Authorizations

Authorization
string
header
required

API key prefixed with 'Bearer sx_live_...'

Body

application/json
card_id
string
required

Card identifier (sx_...)

card_token
string
required

Card secret token (tok_...)

url
string
required

The external payment-protected URL to pay

method
string
default:POST

HTTP method to use when probing the URL

body
object

JSON request body to trigger a priced challenge

headers
object

Optional headers for the probe request

Response

Payment successful

success
boolean
transaction_id
string
amount_debited
number
merchant_amount
number
platform_fee
number
token
string
network
string
protocol
string
settlement
object