> Portal Navigation:
>
> - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version.
> - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages).
> - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt
# CreateTransaction
# Package: paymentServiceProviderServicePlugin
# Namespace: PspTransactionsService
# Method link: https://dev.wix.com/docs/api-reference/business-management/payments/payment-service-provider-service-plugin/transactions/create-transaction.md
## Introduction
This endpoint is used to send a merchant's payment requests to a Payment Service Provider (PSP).
Wix calls this endpoint when a buyer chooses make a payment using the PSP on a merchant's Wix site.
Learn more about [implementing this endpoint](https://dev.wix.com/docs/rest/business-management/payments/service-plugins/payment-service-provider-service-plugin/processing-payments.md).
---
## REST API
### Schema
```
Method: createTransaction
Description: This endpoint is used to send a merchant's payment requests to a Payment Service Provider (PSP). Wix calls this endpoint when a buyer chooses make a payment using the PSP on a merchant's Wix site. Learn more about [implementing this endpoint](https://dev.wix.com/docs/rest/business-management/payments/service-plugins/payment-service-provider-service-plugin/processing-payments.md).
URL: null
Method: POST
# Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
Required parameters: wixTransactionId, merchantCredentials, wixMerchantId, order, order.description
Method parameters:
param name: authorizeOnly | type: authorizeOnly | description: Whether to only authorize or to also immediately capture the transaction. If `true`, Wix sends requests to the PSP's Capture Transaction or Void Transaction endpoints to complete the transaction.
Default: `false`
param name: fraudInformation | type: FraudInformation
- name: remoteIp | type: string | description: Buyer's IP address.
param name: installments | type: installments | description: Number of payment installments requested.
param name: merchantCredentials | type: merchantCredentials | description: Credentials that the PSP provided when the merchant connected their account. | required: true
- name: key | type: string | description: none
- name: value | type: string | description: none
param name: mode | type: Mode
- enum:
undefined - Undefined mode.
live - Request is live.
sandbox - Request is for testing purposes.
param name: moto | type: moto | description: Whether the request is for a Mail Order/Telephone Order payment.
param name: offSession | type: offSession | description: Whether the request is for a recurring payment or merchant initiated transaction. If the value of this field is `true`, the PSP should use a payment method token to process the payment. Learn more about [recurring payments](https://dev.wix.com/docs/rest/api-reference/payment-provider-spi/sample-payment-flows.md#recurring-payments).
param name: order | type: Order | required: true
- name: id | type: string | description: Unique order GUID assigned by Wix.
- name: description | type: OrderDescription | description: Order description. | required: true
- name: totalAmount | type: string | description: Total amount to pay in a currency’s smallest unit. Includes all extra charges such as shipping and taxes. Learn more about [currency units](https://dev.wix.com/docs/rest/api-reference/payment-provider-spi/currencies.md).
- name: currency | type: string | description: Code for the merchant's preferred [currency](https://en.wikipedia.org/wiki/ISO_4217).
- name: items | type: array | description: Order items.
- name: id | type: string | description: Item GUID.
- name: name | type: string | description: Item name.
- name: quantity | type: integer | description: Item quantity.
- name: price | type: string | description: Item price.
- name: description | type: string | description: Item description.
- name: weightInKg | type: number | description: Item weight in KG.
- name: category | type: OrderItemCategory | description: Item category.
- enum: undefined, physical, digital
- name: donation | type: boolean | description: Whether the item is a donation. When true, PayPal's category will be emitted as "DONATION".
- name: charges | type: AdditionalCharges | description: Additional charges applied to the order.
- name: tax | type: string | description: Tax amount applied to the order.
- name: shipping | type: string | description: Shipping costs.
- name: discount | type: string | description: Discount amount applied to the order.
- name: billingAddress | type: Address | description: Order billing address.
- name: firstName | type: string | description: First name.
- name: lastName | type: string | description: Last name.
- name: company | type: string | description: Company name.
- name: address | type: string | description: Address line. This field represents a street and house number concatenation.
- name: street | type: string | description: Street name.
- name: houseNumber | type: string | description: House number.
- name: city | type: string | description: City.
- name: state | type: string | description: State.
- name: zipCode | type: string | description: Zip code.
- name: countryCode | type: string | description: Country.
- name: phone | type: string | description: Phone number.
- name: fax | type: string | description: Fax number.
- name: email | type: string | description: Email address.
- name: taxIdentifier | type: TaxIdentifier | description: Tax identification information.
- name: id | type: string | description: Tax GUID for merchant country.
- name: type | type: string | description: Tax type for merchant country.
- name: shippingAddress | type: Address | description: Order shipping address.
- name: buyerInfo | type: BuyerInfo | description: Buyer information.
- name: buyerId | type: string | description: Unique buyer GUID assigned by Wix.
- name: buyerLanguage | type: string | description: Buyer language in [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.
- name: returnUrls | type: OrderReturnUrls | description: Redirect URLs for different payment outcomes. PSP-hosted payment pages use these URLs to redirect the buyer back to the merchant’s site.
- name: successUrl | type: string | description: Redirect URL for successful payments.
- name: errorUrl | type: string | description: Redict URL for failed payments.
- name: cancelUrl | type: string | description: Redirect URL for cancelled payments.
- name: pendingUrl | type: string | description: Redirect URL for pending payments.
param name: paymentMethod | type: paymentMethod | description: Requested [payment method](https://dev.wix.com/docs/rest/business-management/payments/service-plugins/payment-service-provider-service-plugin/payment-methods.md). If the value of this field is `creditCard`, the `paymentMethodData` field's value includes credit card data in the value of the `card` field. A PSP can specify the payment methods they accept in the [Wix Dev Ceter](https://dev.wix.com).
param name: paymentMethodData | type: PaymentMethodData
- ONE-OF:
- name: card | type: Card | description: Credit card information.
- name: number | type: string | description: Card number.
- name: year | type: integer | description: Card expiration year.
- name: month | type: integer | description: Card expiration month.
- name: cvv | type: string | description: Card verification value (CVV).
- name: holderName | type: string | description: Cardholder's full name.
- name: networkTransactionId | type: string | description: Transaction GUID assigned by a card scheme (for example, Mastercard Trace GUID or Visa Transaction GUID).
- name: dsTransactionId | type: string | description: Transaction GUID assigned by the 3-D Secure Directory Server, when authentication was performed.
- name: transactionLinkId | type: string | description: Transaction Link Identifier assigned by Mastercard.
- name: ideal | type: IDeal | description: IDeal payment information.
- name: issuerBank | type: IssuerBank | description: Bank for issuing the GUIDeal payment.
- enum: UNKNOWN, ING, RABOBANK, ABN_AMRO, SNS_BANK, BUNQ, ASN_BANK, REGIOBANK, TRIODOS_BANK, KNAB, VAN_LANSCHOT, HANDELSBANKEN, REVOLUT
- name: reference | type: PaymentMethodReference | description: Recurring payment token data.
- name: token | type: string | description: Token created locally by the PSP.
- name: applePay | type: ApplePay | description: ApplePay payment information.
- name: pan | type: string | description: Primary account number. The virtual account number obtained when adding a card to a digital wallet.
- name: expirationYear | type: integer | description: 4 digit card expiration year.
- name: expirationMonth | type: integer | description: Card expiration month.
- name: cryptogram | type: string | description: Aka 3ds 2.0 challenge result.
- name: eci | type: string | description: Electronic Commerce Indicator. A number indicating the level of security used in the transaction.
- name: cardholderName | type: string | description: Cardholder's full name.
- name: googlePay | type: GooglePay | description: GooglePay payment information.
- name: pan | type: string | description: Primary account number. The virtual account number obtained when adding a card to a digital wallet.
- name: expirationYear | type: integer | description: 4 digit card expiration year.
- name: expirationMonth | type: integer | description: Card expiration month.
- name: authenticationMethod | type: AuthenticationMethod | description: Transaction authentication method.
- enum: PAN_ONLY, CRYPTOGRAM_3DS
- name: cryptogram | type: string | description: 3DS 2.0 challenge result. Included when the authentication method is `CRYPTOGRAM_3DS`.
- name: eci | type: string | description: Electronic Commerce Indicator. A number indicating the level of security used in the transaction.
- name: accountVerified | type: boolean | description: Whether the buyer's possession of the payment card was validated.
- name: cardholderAuthenticated | type: boolean | description: Whether the cardholder's identity was verified.
- name: cardReader | type: CardReader | description: POS card reader payment information.
- name: terminalId | type: string | description: GUID of the card reader
param name: scaRequested | type: scaRequested | description: Request transaction uses strong customer authentication, such as 3-D Secure.
param name: setupCredentialsOnFile | type: SetupCredentialsOnFile
- name: offSession | type: boolean | description: Whether the request is for setting up a recurring payment. Learn more about [recurring payments](https://dev.wix.com/docs/rest/api-reference/payment-provider-spi/sample-payment-flows.md#recurring-payments).
param name: siteId | type: siteId | description: Wix site GUID.
param name: wixMerchantId | type: wixMerchantId | description: Wix merchant GUID. | required: true
param name: wixTransactionId | type: wixTransactionId | description: Wix transaction GUID. | required: true
Return type: TransactionResponse
- name: pluginTransactionId | type: string | description: PSP transaction GUID.
- name: reasonCode | type: integer | description: Wix [reason code](https://dev.wix.com/docs/rest/api-reference/payment-provider-spi/reason-codes.md) indicating a failed or pending request.
- name: errorCode | type: string | description: PSP-specific error code.
- name: errorMessage | type: string | description: PSP-specific error message.
- name: redirectUrl | type: string | description: URL where Wix can redirect the buyer to complete the payment.
- name: credentialsOnFile | type: CredentialsOnFile | description: Reference to a saved payment method.
- ONE-OF:
- name: cardReference | type: CardReference | description: Network token data.
- name: networkTransactionId | type: string | description: Transaction GUID assigned by a card scheme (for example, Mastercard Trace GUID or Visa Transaction GUID).
- name: dsTransactionId | type: string | description: Transaction GUID assigned by the 3-D Secure Directory Server, when authentication was performed.
- name: transactionLinkId | type: string | description: Transaction Link Identifier assigned by Mastercard.
- name: paymentMethodReference | type: PaymentMethodReference | description: Provider generated token data.
- name: token | type: string | description: Token created locally by the PSP.
```
### Examples
### Making POS card reader payment
```curl
curl -X POST https://psp.example.com/payment \
-H 'Content-Type: application/json' \
-H 'Digest: JWT=ai0zIQqt71bmnkgEJ1CRJchjKJup' \
-d '{
"wixMerchantId": "fcd2655f-e261-4c5b-8129-72a241461a27",
"wixTransactionId": "a15a3ee3-22d3-4a3f-920e-2186e13a19d1",
"paymentMethod": "pos",
"merchantCredentials": {
"client_id": "MerchantClientId",
"client_secret": "MerchantClientSecret"
},
"order": {
"id": "ce590272-87bf-428f-943a-0ff594059712",
"description": {
"totalAmount": "1000",
"currency": "USD",
"items": [
{
"id": "it_1",
"name": "Digital camera",
"quantity": 1,
"price": "1000",
"description": "Portable digital camera",
"category": "physical"
}
],
"buyerInfo": {
"buyerId": "ffc0a971-60cb-4c63-8016-39b1bce41e8d",
"buyerLanguage": "en"
}
},
"returnUrls": {
"successUrl": "https://merchant.com/success",
"errorUrl": "https://merchant.com/error",
"cancelUrl": "https://merchant.com/cancel",
"pendingUrl": "https://merchant.com/pending"
}
},
"installments": 1,
"mode": "live",
"moto": false,
"paymentMethodData": {
"cardReader": {
"terminalId": "e89b-12d3-a456-42665"
}
}
}'
```
### Approving a Google Pay payment with `PAN_ONLY` authentication
```curl
curl -X POST https://psp.example.com/payment \
-H 'Content-Type: application/json' \
-H 'Digest: JWT=ai0zIQqt71bmnkgEJ1CRJchjKJup' \
-d '{
"wixMerchantId": "fcd2655f-e261-4c5b-8129-72a241461a27",
"wixTransactionId": "a15a3ee3-22d3-4a3f-920e-2186e13a19d1",
"paymentMethod": "googlePay",
"merchantCredentials": {
"client_id": "MerchantClientId",
"client_secret": "MerchantClientSecret"
},
"order": {
"id": "ce590272-87bf-428f-943a-0ff594059712",
"description": {
"totalAmount": "1000",
"currency": "USD",
"items": [
{
"id": "it_1",
"name": "Digital camera",
"quantity": 1,
"price": "1000",
"description": "Portable digital camera",
"category": "physical"
}
],
"buyerInfo": {
"buyerId": "ffc0a971-60cb-4c63-8016-39b1bce41e8d",
"buyerLanguage": "en"
}
},
"returnUrls": {
"successUrl": "https://merchant.com/success",
"errorUrl": "https://merchant.com/error",
"cancelUrl": "https://merchant.com/cancel",
"pendingUrl": "https://merchant.com/pending"
}
},
"installments": 1,
"mode": "live",
"moto": false,
"paymentMethodData": {
"googlePay": {
"pan": "11111111-1111-1111-1111-111111111111",
"expirationYear": 2025,
"expirationMonth": 12,
"authenticationMethod": "PAN_ONLY",
"accountVerified": true,
"cardholderAuthenticated": false,
"eci": "02"
}
}
}'
```
### Responding with a 3DS verification redirect
```curl
curl -X POST https://psp.example.com/payment \
-H 'Content-Type: application/json' \
-H 'Digest: JWT=ai0zIQqt71bmnkgEJ1CRJchjKJup' \
-d '{
"wixMerchantId": "fcd2655f-e261-4c5b-8129-72a241461a27",
"wixTransactionId": "a15a3ee3-22d3-4a3f-920e-2186e13a19d1",
"paymentMethod": "creditCard",
"merchantCredentials": {
"client_id": "e89b-12d3-a456-42665",
"client_secret": "a15a3ee3-22d3-4a3f-920e-2186e13a19d1"
},
"order": {
"id": "ce590272-87bf-428f-943a-0ff594059712",
"description": {
"totalAmount": "1000",
"currency": "USD",
"items": [
{
"id": "it_1",
"name": "Digital camera",
"quantity": 1,
"price": "1000",
"description": "Portable digital camera",
"category": "physical"
}
],
"buyerInfo": {
"buyerId": "ffc0a971-60cb-4c63-8016-39b1bce41e8d",
"buyerLanguage": "en"
}
},
"returnUrls": {
"successUrl": "https://merchant.com/success",
"errorUrl": "https://merchant.com/error",
"cancelUrl": "https://merchant.com/cancel",
"pendingUrl": "https://merchant.com/pending"
}
},
"installments": 1,
"mode": "live",
"moto": false,
"paymentMethodData": {
"card": {
"number": "4111111111111111",
"year": 2030,
"month": 12,
"cvv": "777",
"holderName": "John Smith"
}
}
}'
```
### Approving a MOTO payment instantly
```curl
curl -X POST https://psp.example.com/payment \
-H 'Content-Type: application/json' \
-H 'Digest: JWT=ai0zIQqt71bmnkgEJ1CRJchjKJup' \
-d '{
"wixMerchantId": "fcd2655f-e261-4c5b-8129-72a241461a27",
"wixTransactionId": "a15a3ee3-22d3-4a3f-920e-2186e13a19d1",
"paymentMethod": "creditCard",
"merchantCredentials": {
"client_id": "e89b-12d3-a456-42665",
"client_secret": "a15a3ee3-22d3-4a3f-920e-2186e13a19d1"
},
"order": {
"id": "ce590272-87bf-428f-943a-0ff594059712",
"description": {
"totalAmount": "1000",
"currency": "USD",
"items": [
{
"id": "it_1",
"name": "Digital camera",
"quantity": 1,
"price": "1000",
"description": "Portable digital camera",
"category": "physical"
}
],
"buyerInfo": {
"buyerId": "ffc0a971-60cb-4c63-8016-39b1bce41e8d",
"buyerLanguage": "en"
}
},
"returnUrls": {
"successUrl": "https://merchant.com/success",
"errorUrl": "https://merchant.com/error",
"cancelUrl": "https://merchant.com/cancel",
"pendingUrl": "https://merchant.com/pending"
}
},
"installments": 1,
"mode": "live",
"moto": true,
"paymentMethodData": {
"card": {
"number": "4111111111111111",
"year": 2030,
"month": 12,
"cvv": "777",
"holderName": "John Smith"
}
}
}'
```
### Marking a payment as pending
```curl
curl -X POST https://psp.example.com/payment \
-H 'Content-Type: application/json' \
-H 'Digest: JWT=ai0zIQqt71bmnkgEJ1CRJchjKJup' \
-d '{
"wixMerchantId": "fcd2655f-e261-4c5b-8129-72a241461a27",
"wixTransactionId": "a15a3ee3-22d3-4a3f-920e-2186e13a19d1",
"paymentMethod": "creditCard",
"merchantCredentials": {
"client_id": "e89b-12d3-a456-42665",
"client_secret": "a15a3ee3-22d3-4a3f-920e-2186e13a19d1"
},
"order": {
"id": "ce590272-87bf-428f-943a-0ff594059712",
"description": {
"totalAmount": "1000",
"currency": "USD",
"items": [
{
"id": "it_1",
"name": "Digital camera",
"quantity": 1,
"price": "1000",
"description": "Portable digital camera",
"category": "physical"
}
],
"buyerInfo": {
"buyerId": "ffc0a971-60cb-4c63-8016-39b1bce41e8d",
"buyerLanguage": "en"
}
},
"returnUrls": {
"successUrl": "https://merchant.com/success",
"errorUrl": "https://merchant.com/error",
"cancelUrl": "https://merchant.com/cancel",
"pendingUrl": "https://merchant.com/pending"
}
},
"installments": 1,
"mode": "live",
"moto": false,
"paymentMethodData": {
"card": {
"number": "4111111111111111",
"year": 2030,
"month": 12,
"cvv": "777",
"holderName": "John Smith"
}
}
}'
```
### Authorizing a Payment
```curl
curl -X POST https://psp.example.com/payment \
-H 'Content-Type: application/json' \
-H 'Digest: JWT=ai0zIQqt71bmnkgEJ1CRJchjKJup' \
-d '{
"wixMerchantId": "fcd2655f-e261-4c5b-8129-72a241461a27",
"wixTransactionId": "a15a3ee3-22d3-4a3f-920e-2186e13a19d1",
"paymentMethod": "creditCard",
"merchantCredentials": {
"client_id": "e89b-12d3-a456-42665",
"client_secret": "a15a3ee3-22d3-4a3f-920e-2186e13a19d1"
},
"order": {
"id": "ce590272-87bf-428f-943a-0ff594059712",
"description": {
"totalAmount": "1000",
"currency": "USD",
"items": [
{
"id": "it_1",
"name": "Digital camera",
"quantity": 1,
"price": "1000",
"description": "Portable digital camera",
"category": "physical"
}
],
"buyerInfo": {
"buyerId": "ffc0a971-60cb-4c63-8016-39b1bce41e8d",
"buyerLanguage": "en"
}
},
"returnUrls": {
"successUrl": "https://merchant.com/success",
"errorUrl": "https://merchant.com/error",
"cancelUrl": "https://merchant.com/cancel",
"pendingUrl": "https://merchant.com/pending"
}
},
"installments": 1,
"mode": "live",
"moto": false,
"paymentMethodData": {
"card": {
"number": "4111111111111111",
"year": 2030,
"month": 12,
"cvv": "777",
"holderName": "John Smith"
}
},
authorizeOnly: true
}'
```
### Approving a payment instantly
```curl
curl -X POST https://psp.example.com/payment \
-H 'Content-Type: application/json' \
-H 'Digest: JWT=ai0zIQqt71bmnkgEJ1CRJchjKJup' \
-d '{
"wixMerchantId": "fcd2655f-e261-4c5b-8129-72a241461a27",
"wixTransactionId": "a15a3ee3-22d3-4a3f-920e-2186e13a19d1",
"paymentMethod": "creditCard",
"merchantCredentials": {
"client_id": "e89b-12d3-a456-42665",
"client_secret": "a15a3ee3-22d3-4a3f-920e-2186e13a19d1"
},
"order": {
"id": "ce590272-87bf-428f-943a-0ff594059712",
"description": {
"totalAmount": "1000",
"currency": "USD",
"items": [
{
"id": "it_1",
"name": "Digital camera",
"quantity": 1,
"price": "1000",
"description": "Portable digital camera",
"category": "physical"
}
],
"buyerInfo": {
"buyerId": "ffc0a971-60cb-4c63-8016-39b1bce41e8d",
"buyerLanguage": "en"
}
},
"returnUrls": {
"successUrl": "https://merchant.com/success",
"errorUrl": "https://merchant.com/error",
"cancelUrl": "https://merchant.com/cancel",
"pendingUrl": "https://merchant.com/pending"
}
},
"installments": 1,
"mode": "live",
"moto": false,
"paymentMethodData": {
"card": {
"number": "4111111111111111",
"year": 2030,
"month": 12,
"cvv": "777",
"holderName": "John Smith"
}
}
}'
```
### Approving a Apple Pay payment
```curl
curl -X POST https://psp.example.com/payment \
-H 'Content-Type: application/json' \
-H 'Digest: JWT=ai0zIQqt71bmnkgEJ1CRJchjKJup' \
-d '{
"wixMerchantId": "fcd2655f-e261-4c5b-8129-72a241461a27",
"wixTransactionId": "a15a3ee3-22d3-4a3f-920e-2186e13a19d1",
"paymentMethod": "applePay",
"merchantCredentials": {
"client_id": "MerchantClientId",
"client_secret": "MerchantClientSecret"
},
"order": {
"id": "342fc328-e8c0-4343-8369-e8d139f8285c",
"description": {
"totalAmount": "1000",
"currency": "USD",
"items": [
{
"id": "it_1",
"name": "Digital camera",
"quantity": 1,
"price": "1000",
"description": "Portable digital camera",
"category": "physical"
}
],
"buyerInfo": {
"buyerId": "ffc0a971-60cb-4c63-8016-39b1bce41e8d",
"buyerLanguage": "en"
}
},
"returnUrls": {
"successUrl": "https://merchant.com/success",
"errorUrl": "https://merchant.com/error",
"cancelUrl": "https://merchant.com/cancel",
"pendingUrl": "https://merchant.com/pending"
}
},
"installments": 1,
"mode": "live",
"moto": false,
"paymentMethodData": {
"applePay": {
"pan": "1111111111111111",
"expirationYear": 2027,
"expirationMonth": 11,
"cryptogram": "ANrOP3eQb70mAAU5fUL7AoABFB==",
"eci" : "07"
}
}
}'
```
### Approving a Google Pay payment with `CRYPTOGRAM_3DS` authentication
```curl
curl -X POST https://psp.example.com/payment \
-H 'Content-Type: application/json' \
-H 'Digest: JWT=ai0zIQqt71bmnkgEJ1CRJchjKJup' \
-d '{
"wixMerchantId": "fcd2655f-e261-4c5b-8129-72a241461a27",
"wixTransactionId": "a15a3ee3-22d3-4a3f-920e-2186e13a19d1",
"paymentMethod": "googlePay",
"merchantCredentials": {
"client_id": "MerchantClientId",
"client_secret": "MerchantClientSecret"
},
"order": {
"id": "ce590272-87bf-428f-943a-0ff594059712",
"description": {
"totalAmount": "1000",
"currency": "USD",
"items": [
{
"id": "it_1",
"name": "Digital camera",
"quantity": 1,
"price": "1000",
"description": "Portable digital camera",
"category": "physical"
}
],
"buyerInfo": {
"buyerId": "ffc0a971-60cb-4c63-8016-39b1bce41e8d",
"buyerLanguage": "en"
}
},
"returnUrls": {
"successUrl": "https://merchant.com/success",
"errorUrl": "https://merchant.com/error",
"cancelUrl": "https://merchant.com/cancel",
"pendingUrl": "https://merchant.com/pending"
}
},
"installments": 1,
"mode": "live",
"moto": false,
"paymentMethodData": {
"googlePay": {
"pan": "11111111-1111-1111-1111-111111111111",
"expirationYear": 2025,
"expirationMonth": 12,
"authenticationMethod": "CRYPTOGRAM_3DS",
"cryptogram": "uug1soribziny223gmxmh39gdegwve"
"accountVerified": true,
"cardholderAuthenticated": false,
"eci": "02"
}
}
}'
```
### Declining a payment instantly
```curl
curl -X POST https://psp.example.com/payment \
-H 'Content-Type: application/json' \
-H 'Digest: JWT=ai0zIQqt71bmnkgEJ1CRJchjKJup' \
-d '{
"wixMerchantId": "fcd2655f-e261-4c5b-8129-72a241461a27",
"wixTransactionId": "a15a3ee3-22d3-4a3f-920e-2186e13a19d1",
"paymentMethod": "creditCard",
"merchantCredentials": {
"client_id": "e89b-12d3-a456-42665",
"client_secret": "a15a3ee3-22d3-4a3f-920e-2186e13a19d1"
},
"order": {
"id": "ce590272-87bf-428f-943a-0ff594059712",
"description": {
"totalAmount": "1000",
"currency": "USD",
"items": [
{
"id": "it_1",
"name": "Digital camera",
"quantity": 1,
"price": "1000",
"description": "Portable digital camera",
"category": "physical"
}
],
"buyerInfo": {
"buyerId": "ffc0a971-60cb-4c63-8016-39b1bce41e8d",
"buyerLanguage": "en"
}
},
"returnUrls": {
"successUrl": "https://merchant.com/success",
"errorUrl": "https://merchant.com/error",
"cancelUrl": "https://merchant.com/cancel",
"pendingUrl": "https://merchant.com/pending"
}
},
"installments": 1,
"mode": "live",
"moto": false,
"paymentMethodData": {
"card": {
"number": "4111111111111111",
"year": 2030,
"month": 12,
"cvv": "777",
"holderName": "John Smith"
}
}
}'
```
---