LogoLogo
  • OKP APIs
  • Getting Started with OKP
  • API Documentation
    • Deposits API
      • Technical and Security Aspects
        • Calculating the Signature
      • Endpoints
        • Deposit Creation Endpoint
          • Notifications
        • Transactional Account Endpoint
          • Understanding the Solution
        • PCI Deposit Creation Endpoint
        • Deposit Status Endpoint
        • Payment Methods Endpoint
        • Currency Exchange Endpoint
        • Crypto Exchange Endpoint
        • Country States Codes Endpoint
        • Refund Creation Endpoint
          • Notifications
        • Refund Status Endpoint
      • Payment Methods
        • 🌎America
          • 🇧🇷Brazil
            • PIX Biometric
      • API Codes
    • Cashouts API
      • Technical and Security Aspects
        • Calculating the Payload-Signature
      • Endpoints
        • Cashout Creation Endpoint
          • Notifications
        • Cashout Status Endpoint
        • Cashout Update Status Endpoint
        • Cashout Cancellation Endpoint
        • Cashout Bank Codes
      • Countries Validations
        • American Countries
          • 🇧🇷Brazil
      • API Codes
    • Subscriptions API
      • Technical and Security Aspects
        • Calculating the Signature
      • Subscription Creation Endpoints
        • OneShot Subscription Creation
        • PCI Subscription Creation Endpoint
        • Notifications
      • Subscription Cancellation Endpoint
      • Subscription Status Endpoint
    • Quickpay
      • Endpoints
        • Deposit creation endpoint
          • Notifications
        • Deposit status endpoint
    • Bank Account Validation
      • Technical and Security Aspects
        • Calculating the Signature
      • Endpoints
        • Bank Account Validation Endpoint
          • Pix Key Validation and Details Endpoint
      • API Codes
    • KYC API
      • Technical and Security Aspects
        • Calculating the Signature
      • KYC Endpoint
      • API Codes
  • Deposits Tools
    • Cards SDK
      • With User Interface
        • 🚀Color Customization
      • Without User Interface
    • Java SDK
    • PHP SDK
  • Knowledge Base
    • Deposits with Cards SDK
      • With User Interface
      • Without User Interface
    • Countries Specifications
  • PLUGINS
    • WooCommerce
      • Installation
      • Configuration
  • Status Page
Powered by GitBook
On this page
  • 1. Create a Deposit
  • 2. Instantiate Cards SDK
  • 3. Display the Cards SDK component
  • 4. Retrieve the Deposit final status
  1. Knowledge Base
  2. Deposits with Cards SDK

With User Interface

PreviousDeposits with Cards SDKNextWithout User Interface

Last updated 10 months ago

Requirements:

  • Integrate the OneShot Experience flow within the for credit and debit cards payment methods.

  • Install the .

1. Create a Deposit

It must be a deposit for a credit or debit card payment method and within the OneShot Experience, therefore all the required payer information should be included in the request. Additionally, merchants opting to use our Cards SDK should send the parameter token_requested with value true.

Example request

{
    "invoice_id" : "1000000001",
    "amount": "1000",
    "country": "MX",
    "currency": "MXN",
    "payer": {
        "id": "11",
        "document": "CURP4321TEST",
        "first_name": "Ricardo",
        "last_name": "Carlos",
        "email": "juanCarlos@hotmail.com"
    },
    "payment_method": "VI",
    "client_ip": "123.123.123.123",
    "back_url": "https://www.d24.com/deposit_cancelled",
    "success_url": "https://www.d24.com/deposit_completed",
    "error_url": "https://www.d24.com/deposit_error",
    "notification_url": "https://www.d24.com/d24/notify",
    "token_requested":true
}

Example response

{
    "checkout_type": "ONE_SHOT",
    "redirect_url": "https://pay.depositcheckout.com/validate/4BmNaZNydAokLUzAg2jbCrzqBsyyBTVV",
    "deposit_id": 981624749,
    "user_id": "11",
    "merchant_invoice_id": "1000000001",
    "payment_info": {
        "type": "CREDIT_CARD",
        "payment_method": "VI",
        "payment_method_name": "Visa",
        "amount": 1000.0,
        "currency": "MXN",
        "expiration_date": "2024-04-11 18:11:11",
        "created_at": "2024-04-11 18:01:11"
    },
    "checkout_token":"4BmNaZNydAokLUzAg2jbCrzqBsyyBTVV"
}

The checkout_token contains the information within the context of the generated deposit. This information will be decrypted and consumed by the SDK in order to adequate the checkout experience.

2. Instantiate Cards SDK

3. Display the Cards SDK component

Now you can display the CreditCardForm. In order to do so, you need to send in the authToken parameter, the value obtained in the checkout_token of the first step alongside the rest of the parameters (country, onTokenGenerationError and onBack).

The component will take care of the deposit creation by collecting the payer's credit card, and then processing the transaction with the acquirer.

4. Retrieve the Deposit final status

Everytime that the deposit changes it's status, you will receive a webhook notification with the deposit_id for you to retrieve the Status.

Once the user clicks in the Complete button, we will process the transaction and you will receive such webhook.

Now you need to instantiate the already installed Cards SDK. you will find all the technical aspects within instantiation. Remember to retrieve your publicKey from the Merchant Panel, and define the proper environment.

Deposit Creation Endpoint
Cards SDK
Here