First Option : Create an order by CLI
When you create an order the payment must be finished in 1 hour (exactly 3600 seconds) also there is a tolerance level based checker for delayed payments on backend.
$ curl https://api.stellarpay.io/api/gateway?currency=native&key=eb2c4043652f7912&amount=3&description=Latte
# There is a three parameter passed in GET request. Key is your merchant key(id), amount is your order amount and currency is order currency
{
"_id": "9f1c1f34f388fd84",
"userId": "8ac323ce-e555-4227-a8c7-e36ecb75b46d",
"apiId": "eb2c4043652f7912",
"merchantLogo": "http:\/\/www.stickpng.com\/assets\/images\/58428cc1a6515b1e0ad75ab1.png",
"merchantLabel": "Starbucks",
"orderAmount": "5.0000000",
"orderCurrency": {
"currency": native,
"issuer": null,
"rate": null
},
"memo": "67397c17c828c395",
"orderId": "e9fdb9489119e569",
"orderStatus": false,
"transactionId": "",
"paymentAddress": "GC5ZPC6VDWMLN66B35Q6OEY6PEGR2ZX3F7YBW4IMFX2BCLDMPJED5TXZ",
"successUrl": "starbuck0s.com",
"cancelUrl": "starbuck0s.com",
"createdAt": {}
}
# Can take merchant details from the request.
# To follow order details take orderId from the JSON request.
Second Option : Create and order by Checkout
$ Redirect your clients to https://checkout.stellarpay.io/index.html?amount=ORDER_AMOUNT&description=ORDER_DESCRIPTION&merchant=MERCHANT_KEY
# You need to pass your order parameters ; ORDER_AMOUNT & DESCRIPTION and MERCHANT KEY
Example checkout screen :
Track Order
$ curl https://api.stellarpay.io/api/orderDetails/e9fdb9489119e569
# isExpired(check if order exceed experitaion time) | true : order is expired , false : there is still time to pay
# orderStatus | true : paid , false : not paid
# paymentAddress | is merchant address .
After payment
When the order is paid, we're sending a JSON notification to your notification url which is selected from you. You dont need to make extra operation to confirm payment.