Payment Integration & Payment Links
On Peerwallet, you can accept payment from your website via several methods; this simplifies the whole process no matter the programming language you would be using. All you need to do is to send in some specific POST values to a link, and then peerwallet would return a success response with a link if everything you have sent is correct.
The link is then embedded on your website so that the customer is able to pay from his or her Peerwallet balance or pay using the P2P integrations already integrated by Merchants on Peerwallet.
If you want to limit the type of payment methods you want to appear on your payment gateway page, you can do that from your seller tab, or click HERE to Learn more.
End Point
"https://calls.peerwallet.com
/create-link"
Send your keys via headers
VALUE
api-public-key
REQUIRED
Yes
DESCRIPTION
This is your Public API Keys which can be found here.https://peerwallet.
com/map/api-keys
Below are the POST values to send and their explanations on each field.
VALUE
api-public-key
REQUIRED
Yes
DESCRIPTION
This must be a valid email address, if the user doesn’t have an account on Peerwallet, a new account would be automatically created for the user.
If the user already has a Peerwallet account the value here can be the customer’s peerwallet account number also, this would also work.
amount
Yes
This is the amount you want to charge. Just include the amount without comma. Example 10.04 or 40 or 20.019
currency_code
Yes
This is the currency in which you want to sell. Currencies should be in their currency codes example; USD, EUR, GBP, INR, AUD e.t.c. The currency code here could also differ from your primary currency on Peerwallet; Peerwallet shall accurately convert this to your primary balance when the customer has paid.
secret
Yes
Here a unique secret code that MUST be sent at each call, this unique code is what identifies each link you have created. You can also manually fetch the status of a payment using the secret value.
verification
No
Here you specify if you want the customer to have a verified Peerwallet account before they can pay you. Allowed values here are YES or NO. If you set it as YES, then you want only verified users on Peerwallet to be able to pay you.
You should set this as NO or leave it empty if you want to collect payment from general users who already have account with peerwallet or who are using the integration for the first time.
language
No
This would help customers who don’t speak English, so that they would be able to pay and see the checkout page in their preferred language. Allowed values here are language codes like en, fr, ru e.t.c. The default value here is en if nothing was sent.
order_name
No
This is the name of the order, if nothing was sent, we would replace this with the following text; ‘General Payments’
order_description
No
This is the description for the order which would be seen by the customer when paying. If nothing was sent, we would replace this with: Order For General Payments
order_url
No
This is where the customer should be redirected to after payment is successful. If nothing was sent, we shall redirect the customer to a custom success URL on Peerwallet.
redirect_url_failed
No
This is where the customer should be redirected to after payment has failed.
post_url
No
Here is where we would send POST values to; the URL you specify here would receive POST return values from Peerwallet.
off_id
No
If you are also an approved Merchant on Peerwallet you can include here your offer ID if you want your customers to pay you using your active offer. Leave this part empty if you want your customers to be able to pay you via other Merchants on Peerwallet. Do not include this if you do not really understand how this work or what it is. Also, do not place any value the value must be correct else your customers won’t see any P2P payment gateway.
recurring
No
If you want this payment set as a recurring payment, just enter yes or 1, Note that, payment would be charged from the user's Peerwallet balance and not from the payment method,click here to learn more.
recurring_duration
No
If you have set this payment as recurring above, you should enter the duration. Currently, Peerwallet only supports recurring payment Monthly & Yearly.
VALUE
u_fname
REQUIRED
No
DESCRIPTION
The first name of the customer
u_lname
No
The last name of the customer
u_address
No
The address of the customer
u_city
No
The customer’s city
u_state
No
The customer’s state
u_postal_code
No
The zip or postal code of the customer
u_country
No
The customer’s country. Allowed fields here are1) US, CN, UK, FR and so on2) United States, United Kingdom, China e.t.c.Use this link to fetch the available County names on Peerwallet
https://peerwallet.
com/api/api/countries
Post Fields
[
"api-public-key",
"email",
"amount",
"currency_code",
"secret",
"redirect_url",
"post_url",
"off_id"
]
Return Values Success Sample
{
"status": 200,
"pay_link": "https://peerwallet.com/pay/?v=0000000000",
"amount": 10.3,
"currency": "EUR" ,
"note": "Payment link processed"
}
Return Values Error Sample
{
"status": 111,
"note":"API key is either not correct or its in-active"
}