Zid Docs
AppsThemesPayments
AppsThemesPayments
Help Center
Slack
  1. Payment
  • 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

Examples

Responses

🟢200OK
application/json
Bodyapplication/json

🟠400Bad Request
🟠401Unauthorized
🔴500Internal Server error
Request Request Example
Shell
JavaScript
Java
Swift
curl --location 'https://api.paymentprovider.com/tokens' \
--header 'Content-Type: application/json' \
--data '{
    "publishableApiKey": "pk_test_abc123xyz",
    "providerMerchantId": "merchant_456789",
    "name": "John Doe",
    "number": "4111111111111111",
    "cvc": "123",
    "month": "09",
    "year": "2027"
}'
Response Response Example
200 - Example 1
{
    "token": "tok_abc123xyz",
    "brand": "visa",
    "funding": "Credit",
    "country": "SA",
    "network": "visa",
    "lastFour": "4242"
}
Modified at 2026-01-30 20:55:20
Previous
Gateway Error Codes
Next
Execute Payment Request
Built with