curl -X POST https://api.gatepass.io/api/orders/clx1234567890abcdef/confirm \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"transactionId": "FLW-TX-123456789",
"paymentReference": "GP-clx1234567890-1234567890-a1b2c3d4",
"gateway": "flutterwave",
"amount": 102.50,
"walletAddress": "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb"
}'
{
"ok": true,
"status": "COMPLETED",
"order": {
"id": "clx1234567890abcdef",
"paymentStatus": "COMPLETED",
"paymentTxId": "FLW-TX-123456789",
"updatedAt": "2024-05-20T14:35:00Z"
},
"tickets": [
{
"id": "clx1111111111111111",
"tokenId": 1001,
"contractAddress": "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb",
"txHash": "0xabc123def456789...",
"metadataUri": "ipfs://QmX..."
},
{
"id": "clx2222222222222222",
"tokenId": 1002,
"contractAddress": "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb",
"txHash": "0xdef456abc789012...",
"metadataUri": "ipfs://QmY..."
}
],
"notification": {
"title": "Payment Successful",
"message": "Your payment for 2 ticket(s) to Tech Conference 2024 was successful!",
"type": "SUCCESS"
}
}
Confirm payment and finalize an order
curl -X POST https://api.gatepass.io/api/orders/clx1234567890abcdef/confirm \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"transactionId": "FLW-TX-123456789",
"paymentReference": "GP-clx1234567890-1234567890-a1b2c3d4",
"gateway": "flutterwave",
"amount": 102.50,
"walletAddress": "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb"
}'
{
"ok": true,
"status": "COMPLETED",
"order": {
"id": "clx1234567890abcdef",
"paymentStatus": "COMPLETED",
"paymentTxId": "FLW-TX-123456789",
"updatedAt": "2024-05-20T14:35:00Z"
},
"tickets": [
{
"id": "clx1111111111111111",
"tokenId": 1001,
"contractAddress": "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb",
"txHash": "0xabc123def456789...",
"metadataUri": "ipfs://QmX..."
},
{
"id": "clx2222222222222222",
"tokenId": 1002,
"contractAddress": "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb",
"txHash": "0xdef456abc789012...",
"metadataUri": "ipfs://QmY..."
}
],
"notification": {
"title": "Payment Successful",
"message": "Your payment for 2 ticket(s) to Tech Conference 2024 was successful!",
"type": "SUCCESS"
}
}
Documentation Index
Fetch the complete documentation index at: https://mintlify.com/GoodnessFx/GatePass/llms.txt
Use this file to discover all available pages before exploring further.
flutterwave, paystack, or mpesacurl -X POST https://api.gatepass.io/api/orders/clx1234567890abcdef/confirm \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"transactionId": "FLW-TX-123456789",
"paymentReference": "GP-clx1234567890-1234567890-a1b2c3d4",
"gateway": "flutterwave",
"amount": 102.50,
"walletAddress": "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb"
}'
{
"ok": true,
"status": "COMPLETED",
"order": {
"id": "clx1234567890abcdef",
"paymentStatus": "COMPLETED",
"paymentTxId": "FLW-TX-123456789",
"updatedAt": "2024-05-20T14:35:00Z"
},
"tickets": [
{
"id": "clx1111111111111111",
"tokenId": 1001,
"contractAddress": "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb",
"txHash": "0xabc123def456789...",
"metadataUri": "ipfs://QmX..."
},
{
"id": "clx2222222222222222",
"tokenId": 1002,
"contractAddress": "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb",
"txHash": "0xdef456abc789012...",
"metadataUri": "ipfs://QmY..."
}
],
"notification": {
"title": "Payment Successful",
"message": "Your payment for 2 ticket(s) to Tech Conference 2024 was successful!",
"type": "SUCCESS"
}
}
transaction_id and tx_ref. Use these to confirm the order:
// Extract from redirect URL
const urlParams = new URLSearchParams(window.location.search);
const transactionId = urlParams.get('transaction_id');
const txRef = urlParams.get('tx_ref');
// Confirm order
await fetch(`/api/orders/${orderId}/confirm`, {
method: 'POST',
body: JSON.stringify({
transactionId,
paymentReference: txRef,
gateway: 'flutterwave'
})
});
reference parameter after successful payment:
const reference = urlParams.get('reference');
await fetch(`/api/orders/${orderId}/confirm`, {
method: 'POST',
body: JSON.stringify({
transactionId: reference,
paymentReference: reference,
gateway: 'paystack'
})
});
contractAddress and the user provides a walletAddress, NFT tickets are automatically minted: