Skip to main content
POST
/
payments
/
s2s
/
charge-raw-card
cURL
curl --request POST \
  --url https://api.xpaycheckout.com/payments/s2s/charge-raw-card \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --data '{
  "customerDetails": {
    "name": "John Doe",
    "email": "[email protected]",
    "contactNumber": "+919123456789",
    "customerAddress": {
      "country": "US",
      "postalCode": "2424"
    }
  },
  "amount": 2000,
  "currency": "USD",
  "receiptId": "order123",
  "cardDetails": {
    "cardNumber": "4000002500000003",
    "expiryMonth": 1,
    "expiryYear": 28,
    "cvv": "123"
  },
  "offSession": "false",
  "callbackUrl": "https://example.com/callback",
  "metadata": {
    "orderId": "12345",
    "customerNote": "Deliver after 5 PM"
  }
}'
{
"status": "SUCCESS",
"intentId": "in_gKAqR0DjLeOihdTE"
}
Charge a customer’s card directly from your servers without presenting the checkout.
  • Use this endpoint when you already gathered card details and consent within your PCI DSS compliant environment
  • You must obtain explicit approval from [email protected] before using this API

Authorizations

Authorization
string
header
required

Body

application/json
customerDetails
object
required
amount
integer
required
Example:
currency
string
required
Example:
cardDetails
object
required
callbackUrl
string
required
Example:
receiptId
string
Example:
offSession
boolean
default:false
Example:
metadata
object
Example:

Response

status
enum<string>
required
Available options:
CREATED,
SUCCESS,
FAILED
Example:
intentId
string
required
Example:
nextActionRedirectionURL
string
Example:
errorCode
string
Example: