Kushki gateway guide
Quick Start
New to integrating Kushki with Spreedly? Here's your setup guide:
- Retrieve your Kushki credentials
- Contact Kushki to obtain the credentials required for your account configuration.
- Public Merchant ID: required to create the gateway in Spreedly
- Private Merchant ID: required for authentication with Kushki
- Some features also depend on gateway-side enablement in Kushki, including wallet support, network token handling, and country- or merchant-model-specific operations.
- Contact Kushki to obtain the credentials required for your account configuration.
- Get familiar with the Spreedly API
- Review Spreedly API basics
- Understand the core concepts: Gateways, Payment Methods, and Transactions
- Add Kushki gateway to Spreedly in sandbox mode
Review this documentation to understand more about how to test transactions.
| Additional notes |
|---|
|
Adding a Kushki Gateway
Request
curl https://core.spreedly.com/v1/gateways.xml \
-u 'EnvironmentKey:AccessSecret' \
-H 'Content-Type: application/xml' \
-d '<gateway>
<gateway_type>kushki</gateway_type>
<public_merchant_id>Your Public Merchant Id</public_merchant_id>
<private_merchant_id>Your Private Merchant Id</private_merchant_id>
</gateway>'Response
<gateway>
<token>BfJS7t2FECNmGyilnHczpdszxyz</token>
<gateway_type>kushki</gateway_type>
<name>Kushki</name>
<public_merchant_id>Your Public Merchant Id</public_merchant_id>
<characteristics>
<supports_purchase type="boolean">true</supports_purchase>
<supports_authorize type="boolean">true</supports_authorize>
<supports_capture type="boolean">true</supports_capture>
<supports_credit type="boolean">true</supports_credit>
<supports_void type="boolean">true</supports_void>
<supports_verify type="boolean">true</supports_verify>
<supports_store type="boolean">true</supports_store>
<supports_remove type="boolean">true</supports_remove>
<supports_network_tokenization type="boolean">true</supports_network_tokenization>
<supports_inquire_by_gateway_transaction_id type="boolean">true</supports_inquire_by_gateway_transaction_id>
<supports_inquire_by_order_id type="boolean">false</supports_inquire_by_order_id>
<supports_stored_stored_credentials type="boolean">true</supports_stored_stored_credentials>
</characteristics>
</gateway>Purchase
Request
curl https://core.spreedly.com/v1/gateways/[gateway_token]/purchase.xml \
-u 'EnvironmentKey:AccessSecret' \
-H 'Content-Type: application/xml' \
-d '<transaction>
<payment_method_token>payment_method_token</payment_method_token>
<amount>1985</amount>
<currency_code>USD</currency_code>
</transaction>'Third-party 3D Secure 2 auth data
Spreedly automatically handles the field mapping for sending third-party 3DS2 authentication data to Kushki. For more information about using this feature, see the 3DS2 Third-party Authentication Guide.
Spreedly fields map to the relevant Kushki fields as described in the following table. See the Kushki API reference for detailed descriptions of each field and guidance on when to use them.
| Spreedly field | Kushki field |
|---|---|
three_ds_version | specificationVersion |
ecommerce_indicator | eci |
authentication_value | cavv |
authentication_value | ucaf |
directory_server_transaction_id | directoryServerTransactionID |
Stored Credentials
For Kushki, sending stored credential fields can be done using Spreedly's first-class support. For any Authorize or Purchase request, include these fields:
stored_credential_initiatorstored_credential_reason_type
Spreedly maps these values to Kushki's card-on-file behavior.
First / credential-on-file setup (CIT)
reason_type | initiator |
|---|---|
recurring | cardholder |
installment | cardholder |
unscheduled | cardholder |
Subsequent use
reason_type | initiator |
|---|---|
recurring | merchant |
installment | merchant |
unscheduled | merchant |
recurring | cardholder |
installment | cardholder |
unscheduled | cardholder |
You can override the auto-mapped citMit value by passing the cit_mit gateway specific field. When provided, it takes precedence over the initiator and reason_type mapping and is sent to Kushki as-is.
<gateway_specific_fields>
<kushki>
<cit_mit>M103</cit_mit>
</kushki>
</gateway_specific_fields>Learn more about how spreedly enables use of stored credentials by reviewing our Stored credentials Guide
Store
Store operation setup
Kushki stores payment methods through Kushki's payment credential creation endpoint and returns a credential identifier that Spreedly stores as the gateway-side vaulted asset. That stored credential can be reused on later Purchase and Authorize requests where supported. If Kushki returns an existing credential for the same card, Spreedly treats the store operation as successful and uses the existing credential identifier.
Gateway Specific Fields
| Field Name | Type | Required | Description | Example |
|---|---|---|---|---|
amount | Object | No | Detailed amount breakdown for purchase and void transactions, including extra taxes for supported currencies. | {"subtotal_iva":10,"subtotal_iva_0":4.95} |
contact_details | Object | No | Cardholder contact information including document details and phone number in E.164 format. | {"document_type":"CC","phone_number":"+593988734644"} |
full_response | Boolean | No | When true, allows response fields such as approval_code to be returned. | true |
metadata | Object | No | Additional metadata to record with purchase and authorize transactions. | {"productos":"Bananas"} |
months | String | No | Used for deferred transactions in Chile, Colombia, and Peru. | 1 |
deferred_grace_months | String | No | Deferred transaction setting for Ecuador and Mexico. | 05 |
deferred_credit_type | String | No | Deferred transaction setting for Ecuador and Mexico. | 01 |
deferred_months | String | No | Deferred transaction setting for Ecuador and Mexico. | 3 |
product_details | Object | No | Additional product information for purchase and authorize transactions. | {"id":"abc123","title":"xzy123","price":20,"sku":"12345abcde","quantity":1} |
device_type | String | No | Device type passed to Kushki when supported by the request flow. | mobile |
requestor_id | String | No | Requestor identifier for applicable token or authentication flows. | requestor_123 |
network_token_source | String | No | Identifies the network token source when applicable. | spreedly |
authentication_level | String | No | Authentication level for supported flows. | 01 |
mvv | String | No | Additional token-related value supported by Kushki. | 123 |
idempotency_key | String | No | Used for idempotent void and refund requests. Sent as the Idempotency-Key header. | 550e8400-e29b-41d4-a716-446655440000 |
cit_mit | String | No | Overrides auto-mapped stored credential transaction classification. | M103 |
Example request with gateway specific fields
curl https://core.spreedly.com/v1/gateways/[gateway_token]/purchase.xml \
-u 'EnvironmentKey:AccessSecret' \
-H 'Content-Type: application/xml' \
-d '<transaction>
<payment_method_token>payment_method_token</payment_method_token>
<amount>1985</amount>
<currency_code>USD</currency_code>
<gateway_specific_fields>
<kushki>
<amount>
<subtotal_iva>10</subtotal_iva>
<subtotal_iva_0>4.95</subtotal_iva_0>
<ice>3.5</ice>
<iva>1.4</iva>
</amount>
<contact_details>
<document_type>CC</document_type>
<document_number>1009283738</document_number>
<email>[email protected]</email>
<first_name>Diego</first_name>
<last_name>Cadena</last_name>
<phone_number>+593988734644</phone_number>
</contact_details>
<full_response>true</full_response>
<metadata>
<productos>Bananas</productos>
</metadata>
<months>1</months>
<deferred_grace_months>05</deferred_grace_months>
<deferred_credit_type>01</deferred_credit_type>
<deferred_months>3</deferred_months>
<product_details>
<id>abc123</id>
<title>xzy123</title>
<price>20</price>
<sku>12345abcde</sku>
<quantity>1</quantity>
</product_details>
</kushki>
</gateway_specific_fields>
</transaction>'Gateway Specific Response Fields
<transaction>
<token>LLQG7bgxtplfEKt3Elvxyz</token>
<transaction_type>Purchase</transaction_type>
<gateway_specific_fields>
<kushki>
<full_response>true</full_response>
</kushki>
</gateway_specific_fields>
<gateway_specific_response_fields>
<kushki>
<approval_code>867530</approval_code>
</kushki>
</gateway_specific_response_fields>
</transaction>Verify
Kushki supports verify requests through Spreedly.
Verify is used to validate that a card or payment method can be used with Kushki without creating a charge. Spreedly sends the request as an account validation transaction and maps Kushki's successful validation response back to a successful Spreedly Verify transaction.
Inquire
Spreedly can re-query a Kushki transaction's current status via inquire_by_gateway_transaction_id. It calls Kushki's GET /analytics/v2/transactions-list endpoint, filters by the ticket_number stored from the original transaction, and sends a from/to date range around the transaction's creation date. Inquire is supported for purchase, authorize, refund (credit), and general_credit.
Network Tokenization
Kushki supports receiving network tokens directly.
- When an
attempt_network_token: truerequest is made with a valid, active network token, Spreedly passes the network token to Kushki. - Spreedly also passes the scheme-generated cryptogram and any available
TRIDandECI. - No additional account configuration with Kushki is required to begin using network tokens.
Apple Pay and Google Pay
Kushki supports Apple Pay and Google Pay payment methods.
- Tokens collected through Apple Pay or Google Pay can be used in the same way as other payment methods on this gateway.
- No additional configuration is required on Spreedly's side.
- The merchant must enable Apple Pay and Google Pay directly on the Kushki side before using these wallet payment types through Spreedly.
Additional resources
If you need support with this gateway, please contact Support at [email protected].
Kushki Documentation: Reference, https://api-docs.kushkipagos.com/
Updated 12 days ago

