Embedded Direct Sale

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

Process a card payment directly from your backend using the Embedded Integration flow. This endpoint supports both sale and authorization-only transactions, and automatically handles 3-D Secure authentication when required.

❗️

PCI DSS Required

This endpoint accepts raw cardholder data. Your backend must be PCI DSS compliant and card data must never be collected or transmitted from client-side JavaScript.

📘

Request Hash Required

Every Direct Sale request must include a valid hash generated on your backend. See the hash generation section in the Embedded Integration Overview.


Request

MethodPOST
URL{baseUrl}/payment/s2s/sale
AuthenticationHeader x-api-key

Request Body

ParameterTypeRequiredDescription
orderIdstringYesYour unique order reference
amountnumberYesPayment amount
currencystringYesISO currency code (for example SAR)
paymentMethodstringYesPayment method
authstringYesN = Sale • Y = Authorization Only
cardobjectYesCard details
customerobjectYesCustomer information
successUrlstringYesRedirect URL after successful 3DS
failureUrlstringYesRedirect URL after failed 3DS
hashstringYesRequest signature

Generate the request hash immediately before sending the request. The hash must match the card number, customer email, and merchant API key used in the request.


Request Example

{
  "orderId": "ORD-1001",
  "amount": 10.00,
  "currency": "SAR",
  "paymentMethod": "card",
  "auth": "N",
  "card": {
    "cardNumber": "4111111111111111",
    "cardExpiryMonth": "12",
    "cardExpiryYear": "2028",
    "cardCvv": "123",
    "cardHolder": "Ahmed Ali"
  },
  "customer": {
    "name": "Ahmed Ali",
    "email": "[email protected]",
    "phone": "501223324"
  },
  "successUrl": "https://yourstore.com/payment/success",
  "failureUrl": "https://yourstore.com/payment/failure",
  "hash": "COMPUTED_MD5_HASH"
}
🚧

Never log or store full card numbers or CVV values. Sensitive payment data should only exist in memory during request processing.


Responses

{
  "code": 200,
  "message": "Success",
  "data": {
    "result": "ACCEPTED",
    "paymentId": "c09fba3c-59e2-434a-9ec1-5d2e71a44a8d",
    "status": "APPROVED",
    "html": null
  }
}

Response Fields

FieldDescription
resultPayment result (ACCEPTED, PENDING, DECLINED)
statusGateway payment status
paymentIdInternal DigetPay payment identifier
html3-D Secure HTML page when customer authentication is required
📘

If the response contains html, render it in the customer's browser to complete the 3-D Secure authentication flow. Do not fulfill the order until you receive a successful webhook or verify the transaction status.

Store the returned paymentId. It is required for subsequent Status, Capture, Void, and Recurring operations.


Related APIs


e — Embedded (PHP)

Body Params
string
required
number
required
string
required
string
required
string
enum
required
Allowed:
card
object
required
customer
object
required
string
required
string
required
string
required
Response

Language
Credentials
Header
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json