Get the current status of a payment.

POST /api/payments/payment-status

Returns the current status of a payment given a unique payment identifier. Even if using webhooks, we recommend using this endpoint to verify payment completion.

Body

Responses

  • 200 object

    200 OK

    • paymentIdentifier string Required

      Unique identifier for the created payment.

    • status string Required

      Unique identifier for the created payment. Successful transactions will be marked as completed. Transactions that have failed due to technical reasons will be marked Error, while transactions that were flagged and denied by our Anti-Money Laundering program will be marked as AMLError. Transactions that are flagged will always automatically return money to the user.

      Values are Waiting, Cancelled, Error, AMLError, or Completed.

    • isComplete boolean Required

      Simple boolean to determine if a payment has successfully completed.

    • createdDatetime string(date-time) Required

      Datetime of when the payment was first created, in the format: uuuu-MM-dd'T'HH:mm:ss

    • orderId string

      Optional identifier for the transaction for merchant use. Not used by Madora.

    • Optional description for the transaction for merchant use. Not used by Madora.

  • 400 object

    400 Bad Request

    • errorCode string Required

      Values are internal, invalidAmount, badInput, transactionTooLarge, unsupportedLocation, notEnabled, paymetNotFound, wrongAccount, alreadyCancelled, authMissing, or authInvalid.

    • errorMessage string Required
  • 401 object

    401 Unauthorized

    • errorCode string Required

      Values are internal, invalidAmount, badInput, transactionTooLarge, unsupportedLocation, notEnabled, paymetNotFound, wrongAccount, alreadyCancelled, authMissing, or authInvalid.

    • errorMessage string Required
  • 500 object

    500 Internal Server Error

    • errorCode string Required

      Values are internal, invalidAmount, badInput, transactionTooLarge, unsupportedLocation, notEnabled, paymetNotFound, wrongAccount, alreadyCancelled, authMissing, or authInvalid.

    • errorMessage string Required
POST /api/payments/payment-status
curl \
 -X POST https://madora.io/api/payments/payment-status \
 --user "username:password" \
 -H "Content-Type: application/json" \
 -d '{"paymentIdentifier":"f390682f-4ded-41d6-adfd-80c54e85d73f"}'
Request example
{
  "paymentIdentifier": "f390682f-4ded-41d6-adfd-80c54e85d73f"
}
Response example (200)
{
  "paymentIdentifier": "f390682f-4ded-41d6-adfd-80c54e85d73f",
  "status": "Waiting",
  "isComplete": true,
  "createdDatetime": "2023-05-04T09:42:00+00:00",
  "orderId": "1",
  "orderDescription": "test transaction"
}
Response example (400)
{
  "errorCode": "internal",
  "errorMessage": "string"
}
Response example (401)
{
  "errorCode": "internal",
  "errorMessage": "string"
}
Response example (500)
{
  "errorCode": "internal",
  "errorMessage": "string"
}