Solved

Documentation on `checkoutCompleteWithTokenizedPaymentV3:paymentData`

cansin
Excursionist
27 0 23

Hi,


I am trying to implement a custom checkout page relying on Storefront APIs. I am able to use related mutations like`shopifyCheckoutCreate` `checkoutLineItemsReplace`, `checkoutShippingLineUpdate`, `checkoutShippingAddressUpdateV2` without problems. Right now I am struggling with what data to send to `checkoutCompleteWithTokenizedPaymentV3` after I process the payment on my custom payment processor. 


Specifically what `type` needs to be used for `payment` for custom payment processing? (I am assuming `VAULT`) Plus, what should the JSON data look like at `paymentData`? The documentation simply states "A simple string or JSON containing the required payment data for the tokenized payment." which is not helpful.

Thanks.

Accepted Solution (1)

tolgapaksoy
Shopify Partner
105 7 64

This is an accepted solution.

Hi Cansin

These are the variables I use:

{
  "checkoutId": "Z2lkOi8vU2hvcGlmeS9FeGFtcGxlLzE=",
  "payment": {
    "paymentAmount": {
      "amount": "24.99",
      "currencyCode": "EUR"
    },
    "idempotencyKey": "myrandomclientidempotencykey",
    "billingAddress": {...},
    "paymentData": "tok_1EuJbkJAXUm7Q2VgiG2dt0yN",
    "type": "SHOPIFY_PAY"
  }
}

The paymentData token is created using Stripe Token API: https://stripe.com/docs/api/tokens/create_card

 

Obviously if you want to Vault the creditcard, you will have to create a Vault Session first, and use that token in paymentData and the type should be "VAULT"

View solution in original post

Replies 14 (14)