Accept payments in your online store with full control over the payment flow. Tokenize a card, perform one-time charges, authorizations with capture, recurring charges, and refunds — all through a direct REST API.Service available in Mexico only.
Requirements#
Environments#
| Environment | Base URL |
|---|
| Dev | https://lancehorn.billpocket.dev |
| Live | https://lancehorn.billpocket.com |
Get a card token#
Tokenize the cardholder's PAN before processing a payment. Send the card number, expiry date (YYMM), and your API key.{
"pan": "4000000000000002",
"expDate": "3012",
"apiKey": "myAPIKey"
}
{
"status": 1,
"message": "Card stored successfully",
"cardToken": "zJ3STsWSaEsoc6YTyTsWV1S-WI0_czchV1doc6YTy-WI0_czchV1d",
"maskedPAN": "400000******0002"
}
Validate a token#
GET /scops/card/{cardToken}?api_key={apiKey}Check whether a token is valid before charging. A status: 1 means the token exists and contains valid card data.{
"status": 1,
"message": "Card does exist",
"maskedPAN": "400000******0002"
}
Collect a payment#
Process a charge against a tokenized card. Supported transaction types:One-time payment#
{
"apiKey": "myAPIKey",
"cardToken": "zJ3STsWSaE...",
"cvv": "111",
"amount": 500
}
Authorization (pre-auth)#
{
"apiKey": "myAPIKey",
"cardToken": "zJ3STsWSaE...",
"cvv": "111",
"amount": 500,
"txnType": "checkIn"
}
Recurring charge#
{
"apiKey": "myAPIKey",
"cardToken": "zJ3STsWSaE...",
"cvv": "111",
"amount": 500,
"txnType": "recurring",
"contractNumber": "contract123"
}
Deferred (MSI)#
{
"apiKey": "myAPIKey",
"cardToken": "zJ3STsWSaE...",
"cvv": "111",
"amount": 600,
"paymentPlan": 3
}
Without token#
{
"apiKey": "myAPIKey",
"cardReq": {
"pan": "4000000000000002",
"cvv2": "111",
"expDate": "3012"
},
"amount": 500
}
{
"value": {
"status": 1,
"message": "APROBADA",
"opId": 128540,
"txnISOCode": "00",
"authNumber": "BP0190",
"ticketUrl": "38cca53d999...",
"amount": 500,
"maskedPAN": "400000******0002",
"dateTime": 1717721589822
}
}
Capture an authorization#
Capture a prior authorization. Omit amount for a full capture, or send a lower amount for a partial capture.You have 20 days to capture an authorization. After that, held funds are released by the issuing bank.
{
"apiKey": "myAPIKey",
"opId": 128612
}
{
"apiKey": "myAPIKey",
"opId": 128612,
"amount": 250
}
{
"status": 1,
"message": "APROBADA",
"opId": 128802,
"txnISOCode": "00",
"maskedPAN": "424242******4242",
"dateTime": 1718138178662
}
Refund#
Request a full or partial refund. Omit amount for a full refund, or send a lower amount for a partial refund.{
"apiKey": "myAPIKey",
"opId": 128612,
"amount": 200
}
{
"status": 1,
"message": "APROBADA",
"opId": 128608,
"txnISOCode": "00",
"maskedPAN": "400000******0002",
"dateTime": 1717772908535
}
Get transaction status#
GET /scops/txn/{opId}?api_key={apiKey}Retrieve status and details for a previous transaction.{
"status": 1,
"opId": 124100,
"txnISOCode": "00",
"txnISOTextual": "APROBADA",
"authNumber": "BPCK01",
"ticketUrl": "7cfa45251c4...",
"amount": 500,
"maskedPAN": "400000******0002",
"dateTime": 1703624741000,
"captureIndicator": "0"
}
Next steps#
Got a suggestion on this documentation? Contact us.