Number of APIs: 7
100PAY offers its API services via RESTFul APIs. Our APIs has predictable resource-oriented URLs, accepts form-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs. Our Services include the following: To get started, Create a 100Pay Account Authentication to 100PAY API service is performed via an API key (which can either be your For every request, your authentication header should follow the format: Errors are expressed as a combination of HTTP status codes and an accompanying HTML body providing required detail where possible. You should be able to rely on the HTTP status code alone to determine the cause of the problem.
Getting Started
Settings
. Verify Business identity by providing valid Business credentials.
Developers Setting
to access your API keysAuthentication
public
or secret
API key, depending on the endpoint).api-key: LIVE;PK;
Errors
HTTP Status Code Summary
Status Code
Status Text
Implication
200
OK
Everything worked as expected
400
Bad Request
The request was unacceptable, often due to missing a required parameter.
401
Unauthorized
No valid API key provided.
403
Forbidden
The API key doesn’t have permissions to perform the request.
404
Not found
The requested resource doesn’t exist.
500, 502, 503, 504
Server Errors
Something went wrong on 100PAY's end. (These are rare)
POST https://api.100pay.co/api/v1/pay/charge
Initiates a new Payment charge, when given Customer details and billing information.
It's usually the first step in processing Crypto payments via 100PAY checkout.
Field | Type | Description | Use |
---|---|---|---|
ref_id | string |
Unique 6-digits ID assigned to transaction. Used during issue resolution in the future. |
required |
customer | object |
Customer credentials. See attributes below |
required |
billing | object |
Customer billing information. See attributes below |
required |
metadata | object |
Contains information about the customer or the payment itself. These info can be accessed in the response sent to your webhook when new payments arrive. See attributes below |
optional |
callbackurl | string |
A webpage URL to which a customer is redirected after payment success/failure. | required |
userId | string |
User account ID | optional |
charge_source | string |
"api" (if calling 100PAY checkout from backend) "checkout" (if directly using 100PAY checkout payment modal) |
required |
Child Attribute | Type | Description |
---|---|---|
user_id | string |
Unique 3-digits ID assigned to Customer |
name | string |
Customer full name |
phone | string |
Customer mobile number |
string |
Customer email address |
Child Attribute | Type | Description |
---|---|---|
currrency | string |
Currency in which Customer is charged (expressed as abbreviation) |
vat | integer |
Value Added Tax optional |
pricing_type | string |
"fixed" (if expecting a fixed amount), "partial" (if expecting a partial amount) or "fixed_or_partial_price" |
description | string |
Payment description |
amount | string |
Payment amount |
country | string |
Customer's billing country (expressed as abbreviation) |
Field | Type | Description |
---|---|---|
billing | object |
Same as request |
status | object |
Ascertains payment status See attributes below |
ref_id | string |
Same as request |
payments | array |
IDs of initiated payments - be it successful, pending or failed |
charge_source | string |
Same as request |
createdAt | datetime |
ISO8601-encoded DateTime during initiation of payment |
_id | string |
Uniquely-generated Transaction ID |
customer | string |
Same as request |
metadata | object |
Same as request |
callbackurl | string |
Same as request |
userId | string |
Same as request |
app_id | string |
randomly-generated ID |
chargeId | string |
Uniquely-generated Transaction ID |
__v | string |
0 |
hosted_url | string |
URL to 100PAY checkout modal |
Child Attribute | Type | Description |
---|---|---|
context.status context.value |
string integer |
"notpaid" , "paid" , "unpaid" , "overpaid" or "underpaid" returns 0, if context.status is unpaid or notpaid . Otherwise, returns actual value. |
value | string |
Same as context.status |
total_paid | integer |
Total amount received |
2. Retrieve Payment charge details
GET https://api.100pay.co/api/v1/pay/charge/:charge_id
Retrieves previously-initiated Payment charge details, given transaction ID (charge_id
).
charge_id
is included in the response body returned by charge initiation endpoint.
POST https://api.100pay.co/api/v1/pay/crypto/:charge_id
Generates and returns a Network address for each supported wallet. Should be called only after a payment charge has been initiated.
charge_id
is included in the response body returned by charge initiation endpoint.
However, prior to making deposits to any of these addresses, it is strongly advised to activate wallets by calling on price conversion endpoint.
Field | Attributes | Type | Description |
---|---|---|---|
is_cancelled | boolean |
Tells whether, or not, the payment is cancelled | |
_id | string |
Uniquely-generated Transaction ID for tracking crypto deposits | |
charge_id | string |
Same as request | |
app_id | string |
randomly-generated ID | |
code | string |
randomly-generated code | |
wallet | wallet.addresses wallet.payments wallet.code wallet.metadata wallet.localprice_ wallet.chargeinfo_ |
array array string object object object |
Contains Network address for each token along with other vital info. Contains payment info of deposits made randomly-generated code Contains additional information Contains local fiat equivalence of crypto payment Contains IDs and info about User account |
created_at | datetime |
Date and time at which Network addresses were generated | |
expires_at | datetime |
Date and time at which Network addresses will expire |
4. Track deposit in Network Addresses
GET https://api.100pay.co/api/v1/pay/crypto/:_id
Tracks deposits in previously-generated Network addresses and returns deposit info in response body - specifically, wallet.payments
It's recommended to call this endpoint (whenever your webhook receives a request), so as to verify payments before giving a Customer a value.
_id
is a uniquely-generated deposit ID included in the response body returned by Address generation endpoint
Refer to response body of Generate network addresses endpoint
POST https://api.100pay.co/api/v1/pay/crypto/cancel/:charge_id
Terminates a previously-initiated payment charge, and nullifies previously-generated network addresses, such that any deposits sent to the addresses after termination are forever lost.
charge_id
is included in the response body returned by charge initiation endpoint
POST https://api.100pay.co/api/v1/pay/crypto/convert
Performs a currency conversion with respect to Customer's local currency (using official CMC rates), and returns the Crypto-equivalent.
Failure to call this endpoint with the required fields will result in a permanent loss of all funds sent to the generated address.
Field | Attributes | Type | Description |
---|---|---|---|
wallet | wallet.symbol wallet.convertid_ wallet.chart |
string string string |
Selected Crypto token randomly-generated ID assigned to the conversion Must be "cmc" (CoinMarketCap) |
local | local.amount local.currency |
string string |
amount worth of token to be paid currency worth of token to be paid |
_id | string |
a uniquely-generated deposit ID included in the response body returned by Address generation endpoint | |
network | string |
a blockchain network via which deposits could be tracked and confirmed. Currently supports only "bsc" |
Field | Type | Description |
---|---|---|
amount | integer |
Crypto-equivalent |
cuurency | string |
Crypto token |
POST https://api.100pay.co/api/v1/pay/crypto/payment/:payment_id
Verifies successful payment of a token by a customer, using its payment ID.
For a more detailed guide on how to do this, check How to Verify Crypto Payments on 100Pay