POST
/
payments
curl --request POST \
  --url https://api.cloud.flexprice.io/v1/payments \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '{
  "amount": 123,
  "currency": "<string>",
  "destination_id": "<string>",
  "destination_type": "INVOICE",
  "idempotency_key": "<string>",
  "metadata": {},
  "payment_method_id": "<string>",
  "payment_method_type": "CARD",
  "process_payment": true
}'
{
  "amount": 123,
  "attempts": [
    {
      "attempt_number": 123,
      "created_at": "<string>",
      "created_by": "<string>",
      "error_message": "<string>",
      "id": "<string>",
      "metadata": {},
      "payment_id": "<string>",
      "tenant_id": "<string>",
      "updated_at": "<string>",
      "updated_by": "<string>"
    }
  ],
  "created_at": "<string>",
  "created_by": "<string>",
  "currency": "<string>",
  "destination_id": "<string>",
  "destination_type": "INVOICE",
  "error_message": "<string>",
  "failed_at": "<string>",
  "id": "<string>",
  "idempotency_key": "<string>",
  "invoice_number": "<string>",
  "metadata": {},
  "payment_method_id": "<string>",
  "payment_method_type": "CARD",
  "payment_status": "PENDING",
  "refunded_at": "<string>",
  "succeeded_at": "<string>",
  "tenant_id": "<string>",
  "track_attempts": true,
  "updated_at": "<string>",
  "updated_by": "<string>"
}

Authorizations

x-api-key
string
header
required

Enter your API key in the format x-api-key <api-key>*

Body

application/json

Payment configuration

The body is of type object.

Response

201
application/json

Created

The response is of type object.