Create Payment
POST/payments
Creates a new payment with the specified parameters.
You can create a payment in two ways:
- Immediate processing: Provide a
paymentToken
orpaymentMethod
- The payment will be processed instantly - Deferred processing: Create without payment details - The payment remains in
PENDING
status until you confirm it later using the confirm endpoint
When creating a payment without payment details, you can redirect customers to the hosted payment page where they can select their preferred payment method and complete the transaction.
For immediate processing, use one of these token options:
- A temporary
paymentToken
generated on the frontend using monei.js Components - A permanent
paymentToken
from a previous successful payment (whengeneratePaymentToken: true
was included)
Permanent tokens enable one-click checkout experiences for returning customers by allowing you to securely store and reuse payment details without requiring customers to re-enter their information.
Request
Responses
- 200
- 400
- 401
- 404
- 422
- 500
- 503
A payment object
The request is incorrect or could not be processed
Unauthorized error. Please check your auth credentials
The specified resource was not found
The request was well-formed but could not be processed due to semantic errors
Unexpected server error
The service is temporarily unavailable