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.

application/json

Body

Responses

  • 200

    200 OK

    Hide response attributes Show response attributes object
    • 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

    400 Bad Request

    Hide response attributes Show response attributes object
    • errorCode string Required

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

    • errorMessage string Required
  • 401

    401 Unauthorized

    Hide response attributes Show response attributes object
    • errorCode string Required

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

    • errorMessage string Required
  • 500

    500 Internal Server Error

    Hide response attributes Show response attributes object
    • 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 examples (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 examples (400)
{
  "errorCode": "internal",
  "errorMessage": "string"
}
Response examples (401)
{
  "errorCode": "internal",
  "errorMessage": "string"
}
Response examples (500)
{
  "errorCode": "internal",
  "errorMessage": "string"
}