The REST Admin API is a legacy API as of October 1, 2024. Starting April 1, 2025, all new public apps must be built exclusively with the GraphQL Admin API. For details and migration steps, visit our migration guide.
Payment
Sales channels require elevated permissions to interact with the Payment resource. For more information, see the Request Payment Processing section on the Start building a sales channel app page.
The Payment resource allows sales channels to build a fully native checkout experience by submitting a customer's payment details directly to Shopify.
To complete a payment using the Payment resource, first create a payment session by submitting the card details to Shopify's card vault in exchange for a session ID. The session ID can then be used to create a payment for an existing Checkout.
The Payment resource is compatible only with direct payment gateways. For a list of all supported payment gateways, see Direct and external credit card payment providers.
Endpoints
- post/admin/api/latest/checkouts/{token}/payments.
json Creates a new payment - get/admin/api/latest/checkouts/{token}/payments/{payment_
id}. json Retrieves a single payment
The Payment resource
Properties
The details of the credit card used for payment. The following attributes are available:
Show credit_card properties
- first_name: The first name of the cardholder.
- last_name: The last name of the cardholder.
- first_digits: The first six digits of the credit card.
- last_digits: The last four digits of the credit card.
- brand: The credit card brand.
- expiry_month: The expiry month of the credit card.
- expiry_year: The expiry year of the credit card.
A unique identifer for the payment generated by Shopify.
A message describing the error that occured when attempting to process payment, if any.
Specifies the URL that your app or sales channel needs to send the customer to so that they can authenticate their payment. To learn more about how to use this property, refer to Payments apps overview.
The details of the transaction, including the following attributes:
Show transaction properties
- amount: The amount of the transaction.
- amount_in: The amount in before rounding is applied. Not applicable to credit card payments.
- amount_out: The amount out after rounding is applied. Not applicable to credit card payments.
- amount_rounding: The amount of rounding applied. Not applicable to credit card payments.
- authorization: The authorization code returned by the payment provider.
- created_at: The date and time when the transaction was created.
- currency: The currency of the transaction.
- error_code: The error code returned by the payment provider, if any.
- gateway: The name of the payment provider which processed the transaction.
- id: The unique identifier of the transaction.
- kind: The kind of transaction processed, either authorization or sale.
- message: The message returned by the payment provider, if any.
- status: The status of the transaction, either success or failure.
- test: Whether or not the transaction was a test.
A unique idempotency token generated by the app that created the payment request. For more information, refer to Idempotent requests.
The Payment resource
Anchor to POST request, Creates a new paymentpostCreates a new payment
Creates a payment on a checkout using the session ID returned by the card vault
The amount of the payment.
The details of the request, including the following attributes:
Show request_details properties
ip_address: The IP address of the customer.
accept_language: The language preferences of the customer, in the same format as a standard Accept-Language request header.
user_agent: The user agent string for the customer's device.
A session ID provided by the card vault when creating a payment session.
A unique idempotency token generated by your app. This can be any value, but must be unique across all payment requests.
/admin/api/2025-07/checkouts/7yjf4v2we7gamku6a6h7tvm8h3mmvs4x/payments. json
Response
Anchor to GET request, Retrieves a single paymentgetRetrieves a single payment
checkouts
access scope.Retrieves the payment information for an existing payment
Retrieve a payment with a failed transaction
Retrieve a payment with a failed transaction
Retrieve a payment with a succesful transaction
Retrieve a payment with a succesful transaction