đŸ’ŗ
Payment Intent
Fiat ↔ Crypto
USD
â„šī¸
How It Works
1
Create Intent
Click the button — our server calls AmoPay API and receives a secure session URL.
2
Open Cashier
A popup shows a button to open AmoPay's payment page with your session.
3
Complete Payment
Fill in payment details on AmoPay's secure page.
4
Receive Webhook
AmoPay POSTs a signed notification to your callback URL.
Endpoints
Webhook Callback URL
https://paymyudst.com/index.php?action=webhook
Redirect URL
https://paymyudst.com/index.php?action=result
📊
Order Statuses
🔄 INITIALIZE Order created, awaiting user login
📋 CREATED User logged in, order created
âŗ PENDING Awaiting blockchain confirmation
✅ COMPLETED Payment successful
❌ FAILED Payment failed
🔍
Query Order
Check any order by ID
📄
Response Fields
FieldDescription
status Current order status
txStatus Blockchain status (internal)
side BUY or SELL
amount Fiat amount
fiatCurrency Fiat code
cryptoQuantity Crypto received
cryptoCurrency Crypto type
network Blockchain network
orderNo Unique order ID
networkFee Network fee
processingFee Processing fee
txHash Blockchain hash
paymentTime Payment time
creationTime Created time
🔔
Webhook Setup
Real-time notifications
â„šī¸
AmoPay POSTs a signed JWT to your callback URL on each status change. Register this URL in your AmoPay merchant portal.
Endpoint
POST https://paymyudst.com/index.php?action=webhook
Verification Steps
1ī¸âƒŖ Extract JWT from: Authorization: Bearer <token>
2ī¸âƒŖ Verify HMAC-SHA256 signature using your API Secret
3ī¸âƒŖ Check iss === "AMOPAY"
4ī¸âƒŖ Check aud === your Client ID
5ī¸âƒŖ Check iat is within Âą3 minutes
6ī¸âƒŖ Process data object from JWT payload
7ī¸âƒŖ Return HTTP 200 OK
📋
Webhook Logs
Last 20 received
📭
No webhooks received yet. Register your callback URL in the AmoPay merchant portal.
✅
Payment Intent Created!
Your order is ready.
🔗 Open AmoPay Cashier →