Create
Creates a new invoice.
POST Invoice/Create
Input
Parameter | Type | Required | Description | Default |
---|---|---|---|---|
MerchantId | string | yes | your merchant ID | – |
OrderId | string | no | any string generated by you used to track the order in your system | null |
OrderAmount | number | yes | the order amount in orderCurrency | – |
OrderCurrency | string | no | fiat order currency | 'USD' |
UserName | string | no | the user's name to use for sending the payment link | null |
UserEmail | string | no | the user's email address to send the payment link | null |
Subscription | SubscriptionItem[] | no | advanced subscription (see Advanced Subscriptions) | null |
ResetSubscription | boolean | no | whether or not to cancel all prior subscriptions of this user | true |
Memo | string | no | a short description of the invoice to be displayed to the user | null |
TimeExpire | string | no | time when to cancel invoice automatically if not paid | 30 days from now |
SendEmail | boolean | no | whether or not send the invoice and the payment link to the user by email | false |
PostbackUrl | string | no | overrides the postback URL specified in settings in Merchant Panel (useful for custom plugins) | null |
Output
Parameter | Type | Description |
---|---|---|
Id | string | invoice ID |
PaymentLink | string | URL of the payment link |
Example Input
{
"MerchantId": "8XOZ64KC9X",
"OrderId": "123465",
"OrderAmount": 19.95,
"OrderCurrency": "USD",
"UserName": "John Smith",
"UserEmail": "name@email.com",
"Subscription": null,
"ResetSubscription": null,
"Memo": "This payment is for order 123465",
"TimeExpire": null,
"SendEmail": false,
"PostbackUrl": null,
}
Example Output
{
"Id": "shE2LfDbUYlsgz",
"PaymentLink": "https://atlos.io/payment/shE2LfDbUYlsgz"
}