Zid Docs
Merchant APIPayment APIAppsThemes
Merchant APIPayment APIAppsThemes
Help Center
Slack
  1. Payment
  • Our custom MCP server
  • Overview
  • Merchant Activation
  • Payment
    • Overview
    • Embedded Payment
    • Gateway Error Codes
    • Direct Payment
      POST
    • Execute Payment Request
      POST
    • Get payment status
      GET
  • ApplePay
    • ApplePay Checkout
    • Register ApplePay Domain
      POST
    • Providing Merchant Validation
      POST
  • Refund
    • Request Refund
      POST
  • Webhooks
    • Overview
    • Link Merchant Event
      POST
    • Payment Paid Event
      POST
    • Refund Event
      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 Code 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"
}
🟠400Bad Request
Modified at 2025-08-06 14:13:34
Previous
Gateway Error Codes
Next
Execute Payment Request
Built with