This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
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.
You cannot try out this endpoint because it has to be implemented by a payment plugin and can have an arbitrary URL. So please ignore the Authorization and POST sections below as well as the Try It Out button.
Wix transaction ID.
Requested payment method.
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.
Credentials that the PSP provided when the merchant connected their account.
Order information.
Connection mode. Identifies whether a request is live or for testing purposes.
Number of payment installments requested.
Wix merchant ID.
Payment method data such as credit card information.
Fraud prevention data.
Data about recurring payment setup.
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.
Whether the request is for a Mail Order/Telephone Order payment.
Request transaction to be made using strong customer authentication e.g. 3-D Secure.
PSP transaction ID.
Wix reason code indicating a failed or pending request.
PSP-specific error code.
PSP-specific error message.
URL where Wix can redirect the buyer to complete the payment.
This field is ignored, do not send it.
Reference to a saved payment method.
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"
}
}
}'
{
"pluginTransactionId": "e89b-12d3-a456-42665"
}
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.