1. Invoices
AutopayEG
  • Invoices
    • Create invoice
      POST
    • Get invoice
      GET
    • Cancel invoice
      POST
  • Merchant
    • Current merchant
      GET
  • Webhooks
    • Receive Autopay webhook
      POST
  • Schemas
    • InvoiceStatus
    • Provider
    • ErrorEnvelope
    • CreateInvoiceRequest
    • Invoice
    • CreateInvoiceResponse
    • GetInvoiceResponse
    • MerchantMeResponse
    • MerchantFees
    • MerchantTransaction
    • WebhookCustomer
    • WebhookEnvelope
    • WebhookData
  1. Invoices

Get invoice

GET
/api/v1/invoices/{invoice}
Fetches one invoice you own. Use this to reconcile if a webhook may have
been missed (server downtime, 5xx from your app). Do not poll this in a
tight loop while the buyer is paying — you will hit the 120/min limit, and
webhooks are the paid signal.
Do this
Path param is the UUID returned as invoice.id at create time.
If invoice.status is completed and you have not fulfilled yet, fulfill
using the same idempotency key you use for webhooks (invoice.id).
If status is under_review, keep the order on hold.
Confirm
200 and invoice.id matches what you stored.
Other merchants’ ids and unknown UUIDs return 404, not 403.
active_transaction is present when the buyer has started an attempt
(relation is loaded on this endpoint). Create/cancel responses usually omit it.
GET may include extra diagnostic fields on the transaction. For money, use
fees.customer_total and fees.merchant_net only.

Request

Authorization
API Key
Add parameter in header
X-API-Key
Example:
X-API-Key: ********************
API Key
Add parameter in header
X-API-Secret
Example:
X-API-Secret: ********************
or
Bearer Token
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
or
Path Params

Responses

🟢200
application/json
Invoice details
Bodyapplication/json

🟠401Unauthorized
🟠404NotFound
🟠429RateLimited
Request Request Example
Shell
JavaScript
Java
Swift
curl --location '/api/v1/invoices/' \
--header 'X-API-Key: <api-key>' \
--header 'X-API-Secret: <api-key>'
Response Response Example
200 - Pending invoice (no attempt yet)
{
    "invoice": {
        "id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
        "amount": "100.00",
        "currency": "EGP",
        "status": "pending",
        "customer_email": "customer@example.com",
        "customer_name": "Ahmed Ali",
        "customer_phone": "01012345678",
        "customer_metadata": {
            "order_id": "1001"
        },
        "external_reference": "ORD-1001",
        "success_url": "https://merchant.example/orders/1001/success",
        "cancel_url": "https://merchant.example/orders/1001/cancel",
        "webhook_url": "https://merchant.example/webhooks/autopay",
        "expires_at": "2026-08-19T10:00:00+00:00",
        "completed_at": null,
        "cancelled_at": null,
        "created_at": "2026-08-17T10:00:00+00:00",
        "updated_at": "2026-08-17T10:00:00+00:00",
        "active_transaction": null
    }
}
Modified at 2026-08-17 11:17:23
Previous
Create invoice
Next
Cancel invoice
Built with