Payment

Table of Contents

Get access token using client credentials #

Request Body schema: application/json #

Token request parameters

grant_typerequiredstring Value:”client_credentials”Must be “client_credentials”
client_idrequiredstringAccess key ID
client_secretrequiredstringAccess key secret
scoperequiredstringThe access key scope
Responses #
200 A successful access token response as per RFC6749
Response Schema: application/json #
access_tokenrequiredstring
token_typerequiredstring
expires_inrequirednumber

400 An unsuccessful access token response as per RFC6749
Response Schema: application/json #
errorrequiredstring Enum:”invalid_request””invalid_client””invalid_grant””unauthorized_client””unsupported_grant_type””invalid_scope”

#

Request a payment or payout #

Send a payment or payout. Successful payout requests will always return a 202 response.

Authorizations:

bearer

#
HTTP: bearer #

HTTP Authorization Scheme: bearer

Bearer format: JWT

header Parameters #
Cko-Idempotency-KeystringAn optional idempotency key for safely retrying payment requests.
Authorizationrequiredstring
Request Body schema: application/json #

Request a payment or payout.

Tabs:

  • Payment: Standard payment request.
  • Payment Context: Use a payment context ID, etc.
  • Card Payout: Card payout request.
  • Bank Payout: Bank payout request.
One of #
PaymentRequestDto
currencyrequiredstring = 3 characters The three-letter ISO currency code (required, 3 characters).
Source required – object – The source of the payment (e.g., card, bank, etc).
typerequiredstringType of payment source
numberstring
expiry_monthnumber
expiry_yearnumber
cvvstring
amountnumber >= 0 The payment amount in the minor currency unit (e.g., cents). Omit or set to 0 to perform a card verification.
payment_typestring Default: “Regular” Enum:”Regular””Recurring””MOTO””Installment””PayLater””Unscheduled”The type of payment. Required for cardholder-not-present payments (e.g., mail/phone orders, MITs). For MITs, must NOT be “Regular”. Enum: “Regular”, “Recurring”, “MOTO”, “Installment”, “PayLater”, “Unscheduled”.
referencestring <= 80 characters A reference to identify the payment (e.g., order number). Max 80 chars. See Payfac docs for per-scheme limits.
descriptionstring <= 100 characters A description of the payment (max 100 characters).
authorization_typestring Default: “Final” Enum:”Final””Estimated”The authorization type. Enum: “Final”, “Estimated”.
captureboolean Default: trueWhether to capture the payment (if applicable). Default: true.
capture_onstring <date-time> A timestamp (ISO 8601) for scheduled capture. Providing this sets capture to true.
merchant_initiatedbooleanFlags the payment as a merchant-initiated transaction (MIT). Must be true for all MITs. If true, payment_type must not be “Regular”.
Responses #
201 Payment processed successfully
Response Schema: application/json #
idstring
statusstring
approvedboolean
202 Payment asynchronous or further action required
Response Schema: application/json #
idstring
statusstring
approvedboolean

401 Unauthorized

422 Invalid data was sent
Response Schema: application/json #
request_idrequiredstringThe unique request identifier.
error_typerequiredstringThe error type.
error_codesrequiredArray of stringsThe error codes.

429 Too many requests or duplicate request detected
502 Bad gateway

Get payment details #

Returns the details of the payment with the specified identifier string.

Authorizations:

bearerbearer

#
HTTP: bearer #

HTTP Authorization Scheme: bearer

Bearer format: JWT

path Parameters #
idrequiredstring^(pay|sid)_(\w{26})$The payment or payment session identifier
header Parameters #
Authorizationrequiredstring
Responses #

200 Payment retrieved successfully
Response Schema: application/json

One of #
Object
idrequiredstringPayment unique identifier
requested_onrequiredstring <date-time> The date/time the payment was requested
amountrequiredintegerThe original payment amount
currencyrequiredstringThe three-letter ISO currency code of the payment
statusrequiredstring Enum:”Pending””Authorized””Card Verified””Voided””Partially Captured””Captured””Partially Refunded””Refunded””Declined””Canceled””Expired””Paid””Retry Scheduled”The status of the payment
approvedrequiredbooleanWhether the payment was successful
_linksrequiredobject >= 2 properties The links related to the payment
sourceobjectThe source of the payment
destinationobjectThe destination of the payment
amount_requestedinteger or nullThe full amount from the original authorization, if a partial authorization was requested.
payment_typestring or null Default: “Regular” Enum:”Regular””Recurring””MOTO””Installment””PayLater””Unscheduled”The payment type
payment_planobject or nullThe details of a recurring subscription or installment
referencestring or nullYour reference for the payment
descriptionstring or nullA description of the payment
expires_onstring or nullThe timestamp for when the authorization’s validity period expires
balancesobject or nullThe payment balances
3dsobject or null3D Secure payment processing info
authenticationobject or nullAuthentication info
riskobject or nullRisk assessment results
customerobject or nullThe customer to which this payment is linked
billing_descriptorobject or nullBilling descriptor
shippingobject or nullShipping details
payment_ipstring or nullThe IP address used to make the payment
senderobject or nullSender information
amount_allocationsArray of objects or nullThe sub-entities that the payment is being processed on behalf of
recipientobject or nullRecipient information
processingobject or nullProcessing data
itemsArray of objects or nullOrder line items
metadata
object or null Additional metadata
property name*additional property any
ecistring or nullECI security level
scheme_idstring or nullScheme transaction identifier
actionsArray of objects or nullSummary of the payment’s actions
retryobject or nullAsync retry config
pan_type_processedstring or null Enum:”fpan””dpan”Type of PAN used for the payment
cko_network_token_availableboolean or nullIf Checkout Network Token was available
instructionobject or nullPayment instruction details
Object
idrequiredstringPayout unique identifier
requested_onrequiredstring <date-time> The date/time the payout was requested
sourcerequiredobjectThe source of the payout
destinationrequiredobjectThe destination of the payout
amountrequiredintegerThe original payout amount
currencyrequiredstringThe three-letter ISO currency code of the payout
referencestring or nullYour reference for the payout
billing_descriptorobject or nullDetails about the billing descriptor
statusrequiredstring Enum:”Pending””Paid””Declined””Returned”The status of the payout
approvedrequiredbooleanWhether the authorization was successful
senderobject or nullInformation about the sender of the payment’s funds
instructionobject or nullDetails about the instruction for payouts to bank accounts
_linksrequiredobject non-empty Links related to the payouts
Object
idrequiredstringThe unique identifier for the payout.
requested_onrequiredstring <date-time> The UTC date and time the payout was requested.
processed_onrequiredstring or null <date-time> The UTC date and time the payout was approved or declined.
sourcerequiredobjectThe source of the payout.
destinationrequiredobjectThe payout destination.
amountrequiredintegerThe amount to be paid out to the recipient.
currencyrequiredstringThe destination currency, as a three-letter ISO 4217 code.
statusrequiredstring Enum:”pending””approved””declined”The status of the payout.
linksrequiredobjectThe links related to the payment.
referencestring or null <= 50 characters An internal reference to identify the payout.
billing_descriptorobject or nullDetails about the billing descriptor.
senderobject or nullDetails about the payout sender.
scheme_idstring or nullThe scheme transaction identifier.
instructionobject or nullDetails about the instruction for the payout.
metadata
object or null A set of key-value pairs to attach to the payment.
property name*additional property any

401 Unauthorized
404 Payment not found

Get payment actions #

Returns all the actions associated with a payment ordered by processing date in descending order (latest first).

Authorizations

bearerbearer

path Parameters #
idrequiredstring^(pay)_(\w{26})$The payment identifier
header Parameters #
Authorizationrequiredstring

Responses #
200 Payment actions retrieved successfully
Cko-Request-IdstringThe unique identifier of the request
Cko-VersionstringThe version of the API
Response Schema: application/json #

One of

PaymentActionDto

Array

idrequiredstring
typerequiredstring Enum:”Authorization””Card Verification””Void””Capture””Refund””Payout””Return”
amountrequirednumber
response_coderequiredstring
processed_onrequiredstring <date-time>
approvedrequiredboolean
auth_codestring
response_summarystring
authorization_typestring Enum:”Final””Estimated””Incremental”
referencestring
amount_allocations

Array

id requiredstring
amount requirednumber
referencestring
commissionobject
processingobject
itemsArray of objects
metadataobject

401 Unauthorized
404 Payment not found

Increment authorization #

Request an incremental authorization to increase the authorization amount or extend the authorization’s validity period.

Authorizations

bearerbearer

#
HTTP: bearer #

HTTP Authorization Scheme: bearer

Bearer format: JWT

path Parameters #
idrequiredstring^(pay)_(\w{26})$The payment identifier
header Parameters #
Authorizationrequiredstring
Cko-Idempotency-KeystringAn optional idempotency key for safely retrying payment requests.
Request Body schema: application/json #

Increment authorization request body

amountnumber >= 0 The amount to increase the authorization by. Omit or set to 0 to only extend the validity period.
referencestringA reference you can later use to identify this authorization request.
metadataobjectA set of key-value pairs to attach to the authorization request. Only one level of depth is allowed.
Responses #
201 Authorization processed successfully
Cko-Request-IdstringThe unique identifier of the request
Cko-VersionstringThe version of the API
Response Schema: application/json #
action_idrequiredstringThe unique identifier for the action performed against this payment
amountrequirednumberThe payment amount
currencyrequiredstring = 3 characters The three-letter ISO currency code of the payment
approvedrequiredbooleanWhether or not the authorization was successful
statusrequiredstring Enum:”Authorized””Declined”The status of the payment
response_coderequiredstringThe Gateway response code
processed_onrequiredstring <date-time> The date/time the payment was processed
_linksrequiredobjectThe links related to the payment
auth_codestringThe acquirer authorization code if the payment was authorized
response_summarystringThe Gateway response summary
expires_onstringThe timestamp (ISO 8601 code) for when the authorization’s validity period ends
balancesobjectThe payment balances
referencestringYour reference for the payment
processingobjectReturns information related to the processing of the payment
ecistringThe final Electronic Commerce Indicator (ECI) security level used to authorize the payment
scheme_idstringThe scheme transaction identifier

401 Unauthorized
403 Incremental authorization not allowed
404 Payment not found

422 Invalid data was sent
Response Schema: application/json #
request_idrequiredstringThe unique request identifier.
error_typerequiredstringThe error type.
error_codesrequiredArray of stringsThe error codes.

502 Bad gateway

Cancel a scheduled retry #

Cancels an upcoming retry, if there is one scheduled. Cancellation requests are processed asynchronously. You can use workflows to be notified if the cancellation is successful.

Authorizations

bearerbearer

#
HTTP: bearer #

HTTP Authorization Scheme: bearer

Bearer format: JWT

path Parameters #
idrequiredstring^(pay)_(\w{26})$The unique payment identifier.
header Parameters #
Authorizationrequiredstring
Cko-Idempotency-KeystringAn optional idempotency key for safely retrying payment requests.
Request Body schema: application/json #

Cancel retry request body

referencestring <= 80 characters A reference you can later use to identify this cancellation request (max 80 characters).
Responses #
202 Cancellation accepted
Cko-Request-IdstringThe unique identifier of the request
Cko-VersionstringThe version of the API
Response Schema: application/json #
action_idrequiredstringThe unique identifier for the cancellation action.
referencerequiredstringYour reference for the cancellation request.
_linksrequiredobject >= 2 properties The links related to the cancellation.

401 Unauthorized
403 Cancellation not allowed
404 Payment not found

422 Invalid data sent
Response Schema: application/json #
request_idrequiredstringThe unique request identifier.
error_typerequiredstringThe error type.
error_codesrequiredArray of stringsThe error codes.

502 Bad gateway

Capture a payment #

Captures a payment if supported by the payment method. For card payments, capture requests are processed asynchronously. You can use workflows to be notified if the capture is successful.

Authorizations:

bearerbearer

#
HTTP: bearer #

HTTP Authorization Scheme: bearer

Bearer format: JWT

path Parameters #
idrequiredstring^(pay)_(\w{26})$The payment identifier
header Parameters #
Authorizationrequiredstring
Cko-Idempotency-KeystringAn optional idempotency key for safely retrying payment requests.
Request Body schema: application/json #

Capture payment request body

amountnumber >= 0 The amount to capture. If not specified, the full payment amount will be captured.
capture_typestring Default: “Final” Enum:”NonFinal””Final”The type of capture. If set to Final, the remaining available-to-capture balance will be voided.
referencestring <= 80 characters A reference you can later use to identify this capture request (max 80 chars, Amex: 30 chars).
customerobjectThe customer’s details. Required if source.type is tamara.
descriptionstring <= 100 characters A description of the payment (max 100 chars).
billing_descriptorobjectBilling descriptor for the capture.
shippingobjectThe shipping details.
itemsArray of objectsThe order line items.
amount_allocationsArray of objectsThe sub-entities that the payment is being processed on behalf of.
processingobjectProcessing settings for the capture.
metadataobjectA set of key-value pairs to attach to the capture request. Only one level of depth is allowed.
Responses #
202 Capture accepted
Cko-Request-IdstringThe unique identifier of the request
Cko-VersionstringThe version of the API
Response Schema: application/json #
action_idrequiredstringThe unique identifier for the capture action.
referencerequiredstringYour reference for the capture request.
_linksrequiredobject >= 2 properties The links related to the capture.

401 Unauthorized
403 Capture not allowed
404 Payment not found

422 Invalid data sent
Response Schema: application/json #
request_idrequiredstringThe unique request identifier.
error_typerequiredstringThe error type.
error_codesrequiredArray of stringsThe error codes.

502 Bad gateway

Refund a payment #

Refunds a payment if supported by the payment method. For card payments, refund requests are processed asynchronously. You can use workflows to be notified if the refund is successful.

Authorizations:

bearerbearer

#
HTTP: bearer #

HTTP Authorization Scheme: bearer

Bearer format: JWT

path Parameters #
idrequiredstring^(pay)_(\w{26})$The payment identifier
header Parameters #
Authorizationrequiredstring
Cko-Idempotency-KeystringAn optional idempotency key for safely retrying payment requests.
Request Body schema: application/json #

Refund payment request body

site_identifierrequiredstringIdentifies your client site.
timestamprequiredstringThe Unix Epoch time of the call.
versionrequiredstringThe version of the API.
signaturerequiredstringThe HMAC signature for the request.
pnm_payment_identifierrequiredstringThe unique, Payfac-created identifier for this payment.
refund_amountnumberThe amount to be refunded. This parameter should only be included for partial-amount refunds.
refund_currencystringThe currency for the refund (e.g., USD).
Responses #
202 Refund accepted
Cko-Request-IdstringThe unique identifier of the request
Cko-VersionstringThe version of the API
Response Schema: application/json #
action_idrequiredstringThe unique identifier for the refund action.
referencerequiredstringYour reference for the refund request.
_linksrequiredobject >= 2 properties The links related to the refund.

401 Unauthorized
403 Refund not allowed
404 Payment not found

422 Invalid data sent
Response Schema: application/json #
request_idrequiredstringThe unique request identifier.
error_typerequiredstringThe error type.
error_codesrequiredArray of stringsThe error codes.

502 Bad gateway

Reverse a payment #

Beta

You can reverse a payment to return funds back to the customer, without having to manage the appropriate action to take based on the payment’s status.

Depending on the payment’s current status, requesting a payment reversal will automatically perform one of the following actions:

  • Fully refund a captured payment.
  • Void an authorized payment.
  • Cancel retries on a payment with pending retries.
  • Refund partially captured funds and void any remaining authorization amount.
  • Refund all captured funds from a partial refund and void any remaining authorization amount.

You can only request a payment reversal for card authorizations, captures, or an authorisation attempt that has a retry scheduled.

You cannot reverse a payment that has already been fully refunded, voided, or cancelled. If you attempt to do so, you’ll receive a 204 – No Content response code.

For card payments, reversal requests are processed asynchronously. You can use workflows to be notified when the reversal action completes. Note that the notification will depend on the reversal action taken; for example, for voided payments you will receive a payment_voided notification, and so on.

The reversal request will be rejected with a 403 – Forbidden response code if the payment cannot be reversed. This may happen if:

  • the payment is not a card payment
  • the payment is not authorized and is still in the process of 3D Secure (3DS) authentication
Authorizations:

bearerbearer

#
HTTP: bearer #

HTTP Authorization Scheme: bearer

Bearer format: JWT

path Parameters #
idrequiredstring^(pay)_(\w{26})$The unique identifier for the payment.
header Parameters #
Authorizationrequiredstring
Cko-Idempotency-KeystringAn optional idempotency key for safely retrying payment requests.
Request Body schema: application/json #

Reverse payment request body

site_identifierrequiredstringIdentifies your client site.
timestamprequiredstringThe Unix Epoch time of the call.
versionrequiredstringThe version of the API.
signaturerequiredstringThe HMAC signature for the request.
pnm_payment_identifierrequiredstringThe unique, Payfac-created identifier for this payment.
agent_identifierstringThe name or ID of the client agent cancelling the payment.
void_if_not_settledstringSet this parameter to true to completely cancel a payment that has not been settled.
refund_amountnumberThe amount to be refunded. This parameter should only be included for partial-amount refunds.
refund_currencystringThe currency for the refund (e.g., USD).
Responses #
202 Reversal accepted
Cko-Request-IdstringThe unique identifier of the request
Cko-VersionstringThe version of the API
Response Schema: application/json #
action_idrequiredstringThe unique identifier for the payment reversal action.
referencerequiredstringA unique reference for the payment reversal.
_linksrequiredobjectLinks related to the payment reversal.

204 Payment has already been reversed
401 Unauthorized
403 Refund not allowed
404 Payment not found

422 Invalid data sent
Response Schema: application/json #
request_idrequiredstringThe unique request identifier.
error_typerequiredstringThe error type.
error_codesrequiredArray of stringsThe error codes.

502 Bad gateway

Void a payment #

Voids a payment if supported by the payment method.

For card payments, void requests are processed asynchronously. You can use workflows to be notified if the void is successful.

Authorizations

bearer or bearer

#
HTTP: bearer #

HTTP Authorization Scheme: bearer

Bearer format: JWT

path Parameters #
idrequiredstring^(pay)_(\w{26})$The payment identifier
header Parameters #
Authorizationrequiredstring
Cko-Idempotency-KeystringAn optional idempotency key for safely retrying payment requests.
Request Body schema: application/json #

Void payment request body

referencestring <= 80 characters A reference you can later use to identify this void request (max 80 chars, Amex: 30 chars).
metadataobjectA set of key-value pairs to attach to the void request. Only one level of depth is allowed.
Responses #
202 Void accepted
Cko-Request-IdstringThe unique identifier of the request
Cko-VersionstringThe version of the API
Response Schema: application/json #
action_idrequiredstringThe unique identifier for the void action.
referencerequiredstringYour reference for the void request.
_linksrequiredobject >= 2 properties The links related to the void.

401 Unauthorized
403 Void not allowed
404 Payment not found

422 Invalid data sent
Response Schema: application/json #
request_idrequiredstringThe unique request identifier.
error_typerequiredstringThe error type.
error_codesrequiredArray of stringsThe error codes.

502 Bad gateway

Search payments #

Beta

Search and filter through your payment data to retrieve payments that match your query.

If a search returns more results than the value specified in limit, additional results are returned in a new page. A link to the next page of results is returned in the response’s _links.next.href field.

For more information on search syntax, see the Search and filter payments documentation.

Authorizations:

bearer or bearer

#
HTTP: bearer #

HTTP Authorization Scheme: bearer

Bearer format: JWT

header Parameters #
Authorizationrequiredstring
Request Body schema: application/json #

Search payments request body

queryrequiredstring <= 1024 characters The query string.
limitnumber [ 1 .. 1000 ] Default: 10The number of results to return per page.
fromstringThe UTC date and time for the query start in ISO 8601 format. Required if “to” is provided.
tostringThe UTC date and time for the query end in ISO 8601 format. Required if “from” is provided.
Responses #
202 Successful search

Response Schema: application/json

One of

Object

Array

idrequiredstringThe unique identifier of the payment.
requested_onrequiredstringThe UTC date and time the payment was requested, in ISO 8601 format.
sourcerequiredobjectThe source of the payment.
amountrequirednumberThe original payment amount.
amount_requestednumberThe full amount from the original authorization, if a partial authorization was requested.
currencyrequiredstringThe currency of the payment, as a three-letter ISO currency code.
payment_typestringThe type of payment.
processing_channel_idstringThe unique identifier of the processing channel that was used for the payment.
referencestringThe reference for the payment.
statusrequiredstringThe status of the payment.
balancesobjectThe payment’s balances.
3dsobjectDetails relating to payments processed with 3D Secure (3DS).
riskobjectThe payment’s risk assessment results.
customerobjectThe customer linked to the payment.
billing_descriptorobjectAn optional description displayed on the customer’s statement identifying a purchase.
metadataobjectA set of key-value pairs attached to the payout, used to store additional information.
actionsArray of objectsThe actions for the payment.
Object

Array

idrequiredstringThe unique identifier of the payout.
requested_onrequiredstringThe UTC date and time the payment was requested, in ISO 8601 format.
destinationrequiredobjectThe destination of the payout.
amountrequirednumberThe original payout amount.
currencyrequiredstringThe currency of the payout, as a three-letter ISO currency code.
referencestringThe reference for the payout.
billing_descriptorobjectThe billing descriptor details.
statusrequiredstringThe status of the payout.
processing_channel_idstringThe unique identifier of the processing channel that was used for the payout.
senderobjectThe payout sender’s details.
actionsArray of objectsThe actions for the payout.
Object

Array

idrequiredstringThe unique identifier of the payout.
requested_onrequiredstringThe UTC date and time the payment was requested, in ISO 8601 format.
destinationrequiredobjectThe destination of the payout.
amountrequirednumberThe original payout amount.
currencyrequiredstringThe currency of the payout, as a three-letter ISO currency code.
referencestringThe reference for the payout.
billing_descriptorobjectThe billing descriptor details.
statusrequiredstringThe status of the payout.
processing_channel_idstringThe unique identifier of the processing channel that was used for the payout.
senderobjectThe payout sender’s details.
metadataobjectA set of key-value pairs attached to the payout, used to store additional information.
actionsArray of objectsThe actions for the payout.
400 Invalid input
Response Schema: application/json #
request_idrequiredstringThe unique request identifier.
error_typerequiredstringThe error type.
error_codesrequiredArray of stringsThe error codes.

401 Unauthorized
403 Forbidden

422 Invalid data sent
Response Schema: application/json #
request_idrequiredstringThe unique request identifier.
error_typerequiredstringThe error type.
error_codesrequiredArray of stringsThe error codes.

#

Get payment lists #

Returns a list of your business’ payments that match the specified reference. Results are returned in reverse chronological order, with the most recent payments shown first.

Authorizations

bearer or bearer

#
HTTP: bearer #

HTTP Authorization Scheme: bearer

Bearer format: JWT

query Parameters #
referencerequiredstringA reference, such as an order ID, that can be used to identify the payment
limitnumber [ 1 .. 100 ] Default: 10 Example: limit=10The numbers of results to retrieve
skipnumber >= 0 Default: 0 Example: skip=0The number of results to skip
header Parameters #
Authorizationrequiredstring

202 Payments retrieved successfully
401 Unauthorized
422 Unprocessable paging

Leave a Reply

Your email address will not be published. Required fields are marked *

Scroll to Top