Create policy payment

This endpoint validates the input and creates a payment, which will result in a 200 OK successful response, with the created payment in the response.

Path Params
string
required

The unique identifier of the policy.

Query Params
string

To perform an idempotent request, provide the idempotency_key query parameter with the request. An idempotency key is a unique value generated by the client which the platform uses to recognize subsequent retries of the same request. How you create unique keys is up to you, but we suggest using a V4 UUID, or another random string with enough entropy to avoid collisions. Idempotency keys can be up to 255 characters long.

Body Params
string
enum
required

The status to which to create the payment.

Allowed:
string
required

Payment method id of the payment being created. Must be a UUID.

string
enum
required

The type of the payment being created.

Allowed:
string
enum

The type of the payment being created.Required when payment_type is premium or reversal, optional when payment_type is premium_refund, forbidden otherwise.

number
required

The payment amount. Required when retry_of is not provided; otherwise forbidden.

string
required

Description of the payment being submitted. Required when retry_of is not provided; otherwise forbidden.

date-time
required

Date the payment was created.

date-time

Date the payment was finalized. Required when status is failed or successful.

string
enum
required

The collection type of the payment being created.

date-time

Date the payment should be processed.

string

Unique external reference of the payment.

string

Original payment id of the payment being retried. Must be a UUID.

string

A description of the reason the payment failed. Required if status is failed, forbidden otherwise.

string
enum

The additional action to perform when processing a failed payment. block_payment_method: Set the payment method's verification status to blocked, and do not generate a retry. block_retry: Do not generate a retry payment (even if enabled in the product module settings). allow_retry: Generate a retry payment (if enabled in the product module settings). Note: The payment method will be blocked after 4 consecutive failed payments regardless. See the billing settings guide for more details on the number of consecutive payments allowed. This field will be required if status is failed, forbidden otherwise.

Allowed:
string

Optional if status is failed, forbidden otherwise. The failure error code.

Response

Language
Credentials
Basic
base64
:
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json