curl -X POST "https://api.chipipay.com/v1/sku-transactions" \
-H "Authorization: Bearer sk_prod_xxxx" \
-H "Content-Type: application/json" \
-d '{
"walletAddress": "0x1234567890abcdef1234567890abcdef12345678",
"skuId": "sku-tl-TEL010",
"chain": "BASE",
"chainToken": "ETH",
"mxnAmount": 10,
"reference": "7773271789",
"transactionHash": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef"
}'
200 Response
400 Bad Request
400 Bad Request
400 Bad Request
401 Unauthorized
429 Too Many Requests
{
"id" : "tx_1234567890abcdef" ,
"orgId" : "org_1234567890abcdef" ,
"walletAddress" : "0x1234567890abcdef1234567890abcdef12345678" ,
"skuId" : "sku-tl-TEL010" ,
"mxnAmount" : 10 ,
"usdAmount" : 0.59 ,
"reference" : "7773271789" ,
"fileNumber" : null ,
"status" : "pending" ,
"chain" : "BASE" ,
"chainToken" : "ETH" ,
"transactionHash" : "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef" ,
"errorMessage" : null ,
"createdAt" : "2024-01-15T10:30:00Z" ,
"updatedAt" : "2024-01-15T10:30:00Z"
}
Overview
Purchase a service using a blockchain transaction. Before calling this endpoint, you must first process a payment using the Chipi Pay smart contract and provide the transaction hash.
Endpoint
Your secret key prefixed with “Bearer ”
Request Body
The wallet address that made the payment transaction
The SKU ID of the service you want to purchase (obtained from GET /skus)
The blockchain network ID. Supported values: “STARKNET”, “BASE”, “ARBITRUM”, “OPTIMISM”, “ROOTSTOCK”, “SCROLL”
The token used for payment. Supported values: “USDC”, “ETH”, “STRK”, “SLINK”, “ALF”, “BROTHER”, “ARB”, “DOC”
The amount in MXN (Mexican Pesos) for the service
A unique reference number for this transaction (e.g., phone number, account number)
The transaction hash from the blockchain payment
Response Fields
Unique identifier for this transaction
Organization ID that created the transaction
The wallet address that made the payment
The SKU ID of the purchased service
The amount in USD (calculated from MXN)
The reference number provided
File number for the transaction (if applicable, null otherwise)
Current status of the transaction (“pending”, “processing”, “completed”, “failed”)
The blockchain network used
The token used for payment
The blockchain transaction hash
Error message if the transaction failed (null if successful)
ISO 8601 timestamp of when the transaction was created
ISO 8601 timestamp of when the transaction was last updated
Webhook Notifications
Once the transaction is submitted, you’ll receive status updates via webhooks at the URL you configured in your dashboard. The webhook payload will include the transaction status and any additional details about the service delivery.
Error Responses
400 Bad Request
400 Bad Request
400 Bad Request
401 Unauthorized
429 Too Many Requests
{
"error" : "invalid_request" ,
"message" : "Missing required field: skuId"
}
Smart Contract Integration
Before calling this endpoint, you must process the payment using the Chipi Pay smart contract:
The transaction hash from the smart contract payment is required to complete the service purchase.
Supported Chains and Tokens
Chains:
STARKNET
BASE
ARBITRUM
OPTIMISM
ROOTSTOCK
SCROLL
Tokens:
USDC
ETH
STRK
SLINK
ALF
BROTHER
ARB
DOC
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
The body is of type object
.
The response is of type object
.