Zid Docs
Merchant APIPayment APIAppsThemes
Merchant APIPayment APIAppsThemes
Help Center
Slack
  1. Payment
  • Merchant Activation
  • Submitting
  • Webhooks
    • Link Merchant Event
      POST
    • Payment Paid Event
      POST
    • Refund Event
      POST
  • Payment
    • Embedded Payment
    • Gateway Error Codes
    • Execute Payment Request
      POST
    • Get payment status
      GET
    • Direct Payment
      POST
  • ApplePay
    • ApplePay Checkout
    • On Payment Authorized
    • Register ApplePay Domain
      POST
    • On Providing Merchant Validation
      POST
  • Refund
    • Request Refund
      POST
  1. Payment

Direct Payment

POST
https://api.zid.sa/{ProviderUrl}/tokens
This is the endpoint where the card information will be shared and a session is initiated. This request will be sent from the client side directly in the checkout and will not pass through ZidPay backend nor any data will be saved.

Request

Path Params

Body Params application/json

Example
{
    "publishableApiKey": "pk_test_abc123xyz",
    "providerMerchantId": "merchant_456789",
    "name": "John Doe",
    "number": "4111111111111111",
    "cvc": "123",
    "month": "09",
    "year": "2027"
}

Request samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.paymentprovider.com/tokens' \
--header 'Content-Type: application/json' \
--data-raw '{
    "publishableApiKey": "pk_test_abc123xyz",
    "providerMerchantId": "merchant_456789",
    "name": "John Doe",
    "number": "4111111111111111",
    "cvc": "123",
    "month": "09",
    "year": "2027"
}'

Responses

🟢200OK
application/json
Body

Example
{
    "token": "tok_abc123xyz",
    "brand": "visa",
    "funding": "Credit",
    "country": "SA",
    "network": "visa",
    "lastFour": "4242"
}
🟠422Parameter Error
Modified at 2025-06-13 05:39:05
Previous
Get payment status
Next
ApplePay
Built with