Skip to main content
A request can time out after Mojo Payments has done it. Retrying blindly could then create the same invoice twice, and email your customer twice. To make POST /payment-requests safe to retry, send an Idempotency-Key header: any string up to 100 characters that is unique to that invoice in your system, such as its own id.
  • The first request creates the invoice: 201 Created.
  • A repeat with the same key returns that same invoice, with 200 OK, and sends nothing again.
  • Keys are kept for good, per organization: use a new key for each new invoice.
Reading (GET) is always safe to retry. Sending (POST /payment-requests/{id}/send) sends again each time it’s called, so retry it only when you know the first call failed.