Create Payment Charge - POST
The first step to accepting crypto payments with 100Pay Checkout is to create a payment Charge. The charge will include the customer details and the billing information.
It's important to know how the status response field works.
The context field is an Object that includes two fields: "status" and "value". The status fields is the payment status and the value field is the amount the user paid. If the status is "underpaid", then it returns how much the was underpaid so you can use this in a case of refund. If the status is "overpaid", it will return how much was overpaid and if it is "unpaid" or "notpaid", it returns a zero value (0).
Required Fields:
Field | Type | Description |
---|---|---|
Customer | Object | Easily identify your customers by passing their basic information to the customer object. "customer": { "user_id": "111", "name": "Brainy Josh", "phone": "80123456789", "email": "[email protected]" }, |
billing | Object | "billing": { "currency": "NGN", // the currency you wish to charge the customer in "vat": 10, // not required, you can calculate this yourself "pricing_type": "fixed_or_partial_price", // set to "fixed" if you're expecting an exact amount or "partial" if you're expecting a partial payment. "description": "MY TEST PAYMENT", // help the customer know what he's paying for. "amount": "10000", // The amount you're charging the customer "country": "NG" // The billing Country. },` |
metadata | Object | This can include any field. In most cases, you will need extra fields to store information about the customer or the payment itself that you would need later to give value to the customer. you will be able to access this information later in the request sent to your webhook when new payments arrive. |
ref_id | String | Generate something random you can request from the customer later if you need to resolve an issue. |
call_back_url1 | String | This is mostly used when you are using the 100pay hosted checkout and need to redirect the user to a webpage later. so you can pass anything to it. |
userId | String | Use this field to store your userId incase you ned it later. |
charge_sourse | String | Use "api" if you're calling 100Pay checkout from your backend. And "checkout" if you're using the 100pay checkout payment modal. |
AUTHORIZATION - API Key
This request is using API Key from collection Overview
HEADERS
api-key - LIVE;PK;