Guides
Raw API quickstart
Create and inspect a payment using HTTP without the SDK.
Create a payment intent from your server:
curl https://api.mayarin.xyz/v1/payment-intents \
--request POST \
--header 'Authorization: Bearer sk_...' \
--header 'Content-Type: application/json' \
--header 'Mayarin-Version: 2026-08-11' \
--header 'Idempotency-Key: order-4711' \
--data '{
"merchant": {
"id": "merchant_123",
"name": "Bukit Bakery",
"city": "Kuala Lumpur",
"countryCode": "MY"
},
"amount": { "amount": "45.00", "asset": "MYR" }
}'Confirm the intent, then query the payment:
curl --request POST https://api.mayarin.xyz/v1/payment-intents/pi_.../confirm
curl https://api.mayarin.xyz/v1/payments/pi_...For production, prefer a webhook over continuous polling. Polling remains useful when restoring UI state after a browser refresh.