POST https://sandbox.payme.io/api/capture-buyer-tokenPOST https://live.payme.io/api/capture-buyer-tokenseller_payme_id (required): Our unique seller IDThis endpoint can be used only if you are PCI compliant and are able to handle raw credit card infromation.
This end-point is used to create a new token, by sending a request with the full credit card data and getting a response with the token. This token can be used later on to perform sales and other payment actions.
This endpoint takes no path, query or header parameters.
Content type: application/json
| Field | Type | Required | Description |
|---|---|---|---|
seller_payme_id |
string | yes | Our unique seller ID |
buyer_name |
string | no | Buyer's full name |
buyer_social_id |
string | no | Buyer's social ID number |
buyer_email |
string | no | Buyer's email address |
buyer_phone |
string | no | Buyer's phone number |
buyer_zip_code |
string | no | Buyer's address zip code |
credit_card_number |
integer | yes | Card number |
credit_card_exp |
string | yes | Buyer's card exp (MMYY) |
credit_card_cvv |
integer | yes | |
buyer_perform_validation |
boolean | no | Flag for performing an online validation of the card with the Issuer. |
{
"seller_payme_id": "MPLDEMO-MPLDEMO-MPLDEMO-1234567",
"buyer_name": "Idan testing",
"buyer_social_id": "123456789",
"buyer_email": "TestTest@paymeservice.com",
"buyer_phone": "05222222",
"buyer_zip_code": "1q2w3exx",
"credit_card_number": 4111111111111111,
"credit_card_exp": "0322",
"credit_card_cvv": 123
}
curl -X POST 'https://sandbox.payme.io/api/capture-buyer-token' \
-H 'Content-Type: application/json' \
--data-raw '{
"seller_payme_id": "MPLDEMO-MPLDEMO-MPLDEMO-1234567",
"buyer_name": "Idan testing",
"buyer_social_id": "123456789",
"buyer_email": "TestTest@paymeservice.com",
"buyer_phone": "05222222",
"buyer_zip_code": "1q2w3exx",
"credit_card_number": 4111111111111111,
"credit_card_exp": "0322",
"credit_card_cvv": 123
}'
const response = await fetch("https://sandbox.payme.io/api/capture-buyer-token", {
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify({
"seller_payme_id": "MPLDEMO-MPLDEMO-MPLDEMO-1234567",
"buyer_name": "Idan testing",
"buyer_social_id": "123456789",
"buyer_email": "TestTest@paymeservice.com",
"buyer_phone": "05222222",
"buyer_zip_code": "1q2w3exx",
"credit_card_number": 4111111111111111,
"credit_card_exp": "0322",
"credit_card_cvv": 123
}),
});
console.log(await response.text());
import requests
response = requests.post(
"https://sandbox.payme.io/api/capture-buyer-token",
json={
"seller_payme_id": "MPLDEMO-MPLDEMO-MPLDEMO-1234567",
"buyer_name": "Idan testing",
"buyer_social_id": "123456789",
"buyer_email": "TestTest@paymeservice.com",
"buyer_phone": "05222222",
"buyer_zip_code": "1q2w3exx",
"credit_card_number": 4111111111111111,
"credit_card_exp": "0322",
"credit_card_cvv": 123,
},
)
print(response.text)
<?php
$body = <<<'BODY'
{
"seller_payme_id": "MPLDEMO-MPLDEMO-MPLDEMO-1234567",
"buyer_name": "Idan testing",
"buyer_social_id": "123456789",
"buyer_email": "TestTest@paymeservice.com",
"buyer_phone": "05222222",
"buyer_zip_code": "1q2w3exx",
"credit_card_number": 4111111111111111,
"credit_card_exp": "0322",
"credit_card_cvv": 123
}
BODY;
$ch = curl_init('https://sandbox.payme.io/api/capture-buyer-token');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => $body,
]);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
| Field | Type | Description |
|---|---|---|
status_code |
integer | Action status code (0 - Success, 1 - Failure) |
buyer_key |
string | Buyer's unique token |
buyer_name |
string | Buyer's full name |
buyer_email |
string | Buyer's email address |
buyer_phone |
string | Buyer's phone number |
buyer_card_mask |
string | Buyer's card mask |
buyer_card_exp |
string | Buyer's card exp (MMYY) |
buyer_social_id |
string | Buyer's social ID number |
buyer_is_permanent |
boolean | Is the token temporary or permanant |
buyer_status |
integer | The status's buyer |
{
"status_code": 0,
"buyer_key": "BUYER168-6667348Q-V8Z99RXJ-CQ60HNGY",
"buyer_name": "Ran Tester",
"buyer_email": "TestTest@paymeservice.com",
"buyer_phone": "05222222",
"buyer_card_mask": "532610******5846",
"buyer_card_exp": "0426",
"buyer_social_id": "123456789",
"buyer_is_permanent": false,
"buyer_status": null
}
| Field | Type | Description |
|---|---|---|
status_code |
integer | |
status_error_details |
string | |
status_additional_info |
boolean | |
status_error_code |
integer | |
session |
string |
{
"status_code": 1,
"status_error_details": "תוקף כרטיס אשראי לא תקין",
"status_additional_info": false,
"status_error_code": 356,
"session": "khANe7Jl"
}
| Field | Type | Description |
|---|---|---|
status_code |
integer | |
status_error_details |
string | |
status_additional_info |
string | |
status_error_code |
integer | |
session |
string |
{
"status_code": 1,
"status_error_details": "Required parameter is missing",
"status_additional_info": "credit_card_cvv",
"status_error_code": 1,
"session": "0PFThooQ"
}