Skip to content

Commit (capture) a payment intent.

POST
/payments/card/{id}/commit
curl --request POST \
--url https://api.paygasus.com/payments/card/pi_9Z3K01ARZ3NDEKTSV4RRFFQ69G5FAV/commit \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "amount": 1000 }'

Finalizes a card payment intent. Requires the intent to be in authorized, which only intents created with capture_method: "manual" rest in — automatic intents capture during authorize and never need this endpoint. After commit, use cancel to void an unsettled transaction (same day) or refund once settled (later day).

id
required
string
Example
pi_9Z3K01ARZ3NDEKTSV4RRFFQ69G5FAV

Payment intent ID

Media typeapplication/json
object
amount
required

A monetary amount in the currency’s minor units (e.g. cents for USD).

integer format: int64
Example
1000

Processed. The intent reflects the outcome: committed (approved), failed (declined), or processing (async settlement, e.g. ACH)

Media typeapplication/json
object
amount
required

A monetary amount in the currency’s minor units (e.g. cents for USD).

integer format: int64
amount_captured
required

A monetary amount in the currency’s minor units (e.g. cents for USD).

integer format: int64
amount_refunded
required

A monetary amount in the currency’s minor units (e.g. cents for USD).

integer format: int64
capture_method
required
string
Allowed values: automatic manual
created
required
integer format: int64
currency
required

Currently supported currencies by Paygasus Pay

string
Allowed values: USD
description
string | null
id
required
string
livemode
required
boolean
metadata
required
object
key
additional properties
string
payment_method
required
object
brand
required
string
Allowed values: AMEX VISA MASTERCARD DISCOVER
last4
required
string
statement_descriptor
string | null
status
required
One of:
object
status
required
string
Allowed values: created
updated
required
integer format: int64
Example
{
"amount": 1000,
"amount_captured": 1000,
"amount_refunded": 1000,
"capture_method": "automatic",
"currency": "USD",
"id": "pi_9Z3K01ARZ3NDEKTSV4RRFFQ69G5FAV",
"payment_method": {
"brand": "AMEX"
},
"status": {
"status": "created"
}
}

No such payment intent

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
param
string | null
type
required
string
Examplegenerated
{
"error": {
"code": "example",
"message": "example",
"param": "example",
"type": "example"
}
}

Intent is not in a committable state, or is already being processed

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
param
string | null
type
required
string
Examplegenerated
{
"error": {
"code": "example",
"message": "example",
"param": "example",
"type": "example"
}
}

Processor transport failure; the operation is retryable

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
param
string | null
type
required
string
Examplegenerated
{
"error": {
"code": "example",
"message": "example",
"param": "example",
"type": "example"
}
}