# Samsung Pay for Payment Setup API To accept Samsung Pay payments, you must: 1. Create a payment setup. 2. Update the payment setup with the Samsung Pay token. 3. Confirm the payment. --- ## Create a payment setup Call the [Create a payment setup](https://api-reference.checkout.com/tag/Payment-Setups/#operation/createAPaymentSetup) endpoint. > **Information** > > The Payment Setup API supports [idempotency](https://www.checkout.com/docs/developer-resources/api/idempotency.md). You can safely retry API requests without the risk of duplicate requests. > **Information** > > Your base URL's `{prefix}` value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see [API endpoints](https://www.checkout.com/docs/developer-resources/api/api-endpoints.md). **Production** `POST` `https://{prefix}.api.checkout.com/payments/setups` **Sandbox** `POST` `https://{prefix}.api.sandbox.checkout.com/payments/setups` ### Request example ```json { "processing_channel_id": "pc_wzjki6hw5puepb5fnvqlizj2e4", "currency": "GBP", "amount": 2000, "reference": "ORDER_01234", "description": "Samsung Pay payment", "payment_type": "regular", "settings": { "success_url": "https://example.com/payments/success", "failure_url": "https://example.com/payments/failure" } } ``` In the request body, provide the following: - `processing_channel_id` – The [processing channel's](https://www.checkout.com/docs/business-operations/use-the-dashboard/manage-processing-channels.md) unique identifier - `amount` – The payment amount - `currency` – The payment currency ### Response example ```json { "id": "set_rcmepwrchqab2wsergcafvijfy", "processing_channel_id": "pc_wzjki6hw5puepb5fnvqlizj2e4", "amount": 2000, "currency": "GBP", "payment_type": "regular", "reference": "ORDER_01234", "description": "Samsung Pay payment", "payment_methods": { "samsungpay": { "status": "action_required", "flags": [ "token_required" ] } }, "available_payment_methods": [ "samsungpay" ], "settings": { "success_url": "https://example.com/payments/success", "failure_url": "https://example.com/payments/failure" } } ``` The response returns a `payment_methods` object, which contains the payment methods enabled on your account. For Samsung Pay, `payment_methods` contains the following fields: - `status` – The [status of the payment method](https://www.checkout.com/docs/payments/accept-payments/accept-a-payment-using-the-payment-setup-api#Payment_method_status). - `flags` – An array of error codes or indicators that highlight missing or invalid information. The `token_required` flag indicates that you must provide a Checkout.com token. --- ## Update the payment setup When the customer selects Samsung Pay as the payment method on the checkout page: 1. Retrieve the Samsung Pay payment credential and tokenize it with a Checkout.com token. For more information, see [Samsung Pay for Unified Payments API](https://www.checkout.com/docs/payments/add-payment-methods/samsung-pay/unified-payments-api.md). 2. Call the [Update a payment setup](https://api-reference.checkout.com/tag/Payment-Setups/#operation/updateAPaymentSetup) endpoint to submit the token. Provide the following fields: | Field | Description | | --- | --- | | `amount`
`number` | The payment amount, in the [minor currency unit](https://www.checkout.com/docs/payments/accept-payments/format-the-amount-value).

Minimum: 1

**Required** | | `currency`
`string` | Three-letter ISO 4217 [currency code](https://www.checkout.com/docs/developer-resources/codes/currency-codes.md).

**Required** | | `payment_methods.samsungpay.token`
`object` | The Checkout.com Samsung Pay token. If you do not provide it, the payment method returns the `action_required` status and the `token_required` flag.

**Required** | | `processing_channel_id`
`string` | The [processing channel's](https://www.checkout.com/docs/business-operations/use-the-dashboard/manage-processing-channels.md) unique identifier.

Pattern: `^(pc)_(\w{26})$`

**Required** | | `settings.failure_url`
`string` | The URL to redirect the customer after a failed authorization.

Format: `uri`

**Required** | | `settings.success_url`
`string` | The URL to redirect the customer after a successful authorization.

Format: `uri`

**Required** | | `billing_descriptor.city`
`string` | The city from which the payment was made.

Min length: 1

Max length: 13

**Conditional**

Required if `billing_descriptor` is provided. | | `billing_descriptor.name`
`string` | A dynamic description of the payment.

Min length: 1

Max length: 25

**Conditional**

Required if `billing_descriptor` is provided. | | `payment_methods.samsungpay.account_holder.company_name`
`string` | The account holder's company name.

**Conditional**

Required if `payment_methods.samsungpay.account_holder.type` is `corporate` or `government`. | | `payment_methods.samsungpay.account_holder.first_name`
`string` | The account holder's first name.

**Conditional**

Required if `payment_methods.samsungpay.account_holder.type` is `individual`. | | `payment_methods.samsungpay.account_holder.last_name`
`string` | The account holder's last name.

**Conditional**

Required if `payment_methods.samsungpay.account_holder.type` is `individual`. | | `payment_methods.samsungpay.token.id`
`string` | The token identifier, prefixed by `tok_`.

Pattern: `^(tok)_(\w{26})$`

**Conditional**

Required if `payment_methods.samsungpay.token` is provided. | | `billing.address.address_line1`
`string` | The first line of the billing address. | | `billing.address.address_line2`
`string` | The second line of the billing address. | | `billing.address.city`
`string` | The city of the billing address. | | `billing.address.country`
`string` | The two-letter ISO 3166 country code of the billing address. | | `billing.address.state`
`string` | The state of the billing address. | | `billing.address.zip`
`string` | The zip or postal code of the billing address. | | `billing_descriptor`
`object` | The billing descriptor shown on the customer's statement. | | `billing_descriptor.reference`
`string` | The reference shown on the statement.

Max length: 50 | | `customer.email.address`
`string` | The customer's email address. | | `customer.id`
`string` | The customer's unique identifier. | | `customer.phone.country_code`
`string` | The international dialing code for the customer's phone number. | | `customer.phone.number`
`string` | The customer's phone number. | | `description`
`string` | A description of the payment.

Max length: 100 | | `payment_methods.samsungpay.account_holder`
`object` | The Samsung Pay account holder details. | | `payment_methods.samsungpay.account_holder.account_name_inquiry`
`boolean` | Indicates whether to perform an account name inquiry. | | `payment_methods.samsungpay.account_holder.middle_name`
`string` | The account holder's middle name. | | `payment_methods.samsungpay.account_holder.type`
`string` | The account holder type.

Supported values:

- `individual`

- `corporate`

- `government` | | `payment_methods.samsungpay.store_for_future_use`
`boolean` | Indicates whether to store the payment details for future use. If set to `false`, the payment response does not include a payment instrument. | | `payment_methods.samsungpay.token.expires_on`
`string` | The date and time at which the token expires.

Format: date-time | | `payment_type`
`string` | The type of payment.

Supported values:

- `regular`

- `recurring`

- `installment`

- `unscheduled` | | `reference`
`string` | The payment reference.

Max length: 80 | ### Request example ```json { "processing_channel_id": "pc_wzjki6hw5puepb5fnvqlizj2e4", "currency": "GBP", "amount": 2000, "reference": "ORDER_01234", "description": "Samsung Pay payment", "payment_type": "regular", "settings": { "success_url": "https://example.com/payments/success", "failure_url": "https://example.com/payments/failure" }, "payment_methods": { "samsungpay": { "token": { "id": "tok_hilxnnylkxtutoswkxx2425lzi", "expires_on": "2026-11-02T16:12:05Z" } } } } ``` ### Response example ```json { "id": "set_rcmepwrchqab2wsergcafvijfy", "processing_channel_id": "pc_wzjki6hw5puepb5fnvqlizj2e4", "amount": 2000, "currency": "GBP", "payment_type": "regular", "reference": "ORDER_01234", "description": "Samsung Pay payment", "payment_methods": { "samsungpay": { "status": "ready", "flags": [], "token": { "id": "tok_hilxnnylkxtutoswkxx2425lzi", "expires_on": "2026-11-02T16:12:05Z" } } }, "available_payment_methods": [ "samsungpay" ], "settings": { "success_url": "https://example.com/payments/success", "failure_url": "https://example.com/payments/failure" } } ``` The response returns a `ready` status when the token has been successfully validated. The payment is ready to confirm. If the token has expired, the response returns an `invalid` status with the `token_expired` flag. Tokenize the Samsung Pay credential again and resubmit the new token. --- ## Confirm the payment When the payment status changes to `ready`, confirm the payment by calling the [Confirm a payment setup](https://api-reference.checkout.com/tag/Payment-Setups/#operation/confirmAPaymentSetup) endpoint and provide: - The payment setup `id` as the `{id}` path parameter. - `samsungpay` as the `{payment_method_name}` path parameter. **Production** `POST` `https://{prefix}.api.checkout.com/payments/setups/{id}/confirm/samsungpay` **Sandbox** `POST` `https://{prefix}.api.sandbox.checkout.com/payments/setups/{id}/confirm/samsungpay`