API reference
Create a payment
Create a hosted payment for a customer and receive a payment URL.
POST
https://api.xxpayus.online/api/v1/payments/createAgentRequest body
| Field | Type | Description |
|---|---|---|
| method | string, required | Payment method id, e.g. cashapp, chime, googlepay, applepay, venmo, paypal |
| amount | number, required | Amount in USD. Must be one of the amounts enabled for the method on your account. |
| description | string, optional | Up to 500 characters |
Response · 201
Payment flow
- 1Your server creates the payment.
- 2Redirect your customer to payment_url, the actual HTTPS checkout URL returned by the payment provider.
- 3XXPayUS sends a payment webhook to your endpoint.
- 4Confirm the final status with GET /transactions/{id} before fulfilling the order.
Idempotency keys are not supported yet. Avoid retrying a create request automatically; check for the transaction first.