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
amount
number
required
currency
string
required
destination_id
string
required
destination_type
enum<string>
required
Available options:
INVOICE
payment_method_type
enum<string>
required
Available options:
CARD,
ACH,
OFFLINE,
CREDITS
idempotency_key
string
metadata
object
payment_method_id
string
process_payment
boolean
default:true

Response

201
application/json
Created
amount
number
attempts
object[]
created_at
string
created_by
string
currency
string
destination_id
string
destination_type
enum<string>
Available options:
INVOICE
error_message
string
failed_at
string
id
string
idempotency_key
string
invoice_number
string
metadata
object
payment_method_id
string
payment_method_type
enum<string>
Available options:
CARD,
ACH,
OFFLINE,
CREDITS
payment_status
enum<string>
Available options:
PENDING,
PROCESSING,
SUCCEEDED,
FAILED,
REFUNDED,
PARTIALLY_REFUNDED
refunded_at
string
succeeded_at
string
tenant_id
string
track_attempts
boolean
updated_at
string
updated_by
string