Important: For authentication, you must include the required HTTPS headers in each request. For more information about the authentication HTTPS headers, see Authenticating Your Requests.
If the merchant can’t access the customer’s physical card, send a POST request to the relevant endpoint to take a payment from the customer’s account. Because the card is not present, the request must include either the customer's payment details or their corresponding token. The token is either temporary (generated through PayFields and can be used for one transaction only) or permanent (represents the customer's saved payment details in our vault and can be used for unlimited transactions).
The endpoint you POST to depends on whether you identify the authorization using the creditauth_id (generated by the gateway) or the reference_id (generated by the merchant’s POS).
| Environment | HTTP Method | URL |
|---|---|---|
| Partner Integration Test | POST | https://api.pit.paygateway.com/transactions/creditsales |
| Production | POST | https://api.paygateway.com/transactions/creditsales |
Content-Type: application/json
Authorization: AuthToken {AuthTokenV2}
X-GP-Request-Id: {request_id}
X-GP-Version: 2021-04-08
X-GP-Api-Key: {API Key}
X-GP-Source-App-Name: {Name of integrating application}
{
"reference_id": "MER-d096c579-9bc5-4798-a3e0-29c76737e918",
"card": {
"card_number":"4761739001010010",
"expiry_month":"12",
"expiry_year":"25",
"cardholder_name":"test name"
},
"payment": {
"amount": "4.08",
"currency_code": "840"
},
"transaction": {
"country_code": "840",
"processing_indicators":{
"allow_duplicate":true
}
}
}{
"creditsale_id": "000000000079",
"status": "approved",
"approval_code": "774387",
"processor_response": "DEVELOPMENT APPROVAL",
"card": {
"masked_card_number": "476173XXXXXX0010",
"cardholder_name": "test name",
"expiry_month": "12",
"expiry_year": "25",
"type": "visa"
},
"payment": {
"amount": "0.11",
"currency_code": "840",
"type": "credit"
},
"transaction": {
"batch_amount": "14.68",
"batch_number": "000003",
"entry_type": "keyed",
"language": "en-US"
},
"links": [
{
"creditsale_id": [
{
"href": "https://api.pit.paygateway.com/transactions/creditsales/000000000079",
"relation": "self",
"method": "GET",
"description": "Use this endpoint to retrieve a sales transaction."
},
{
"href": "https://api.pit.paygateway.com/transactions/creditsales/000000000079",
"relation": "self",
"method": "PATCH",
"description": "Use this endpoint to update the amount or other values of a previous sales transaction."
},
{
"href": "https://api.pit.paygateway.com/transactions/creditsales/000000000079/voids",
"relation": "void",
"method": "PUT",
"description": "Use this endpoint to void a previous sales transaction."
},
{
"href": "https://api.pit.paygateway.com/transactions/creditsales/000000000079/returns",
"relation": "return",
"method": "POST",
"description": "Use this endpoint to create a returns transaction associated with a previous sales transaction."
}
]
},
{
"reference_id": [
{
"href": "https://api.pit.paygateway.com/transactions/creditsales/reference_id/MER-627a3601-82da-4c6a-b9ad-49e2f90fda71",
"relation": "self",
"method": "GET",
"description": "Use this endpoint to retreive a previous sales transaction using reference id."
},
{
"href": "https://api.pit.paygateway.com/transactions/creditsales/reference_id/MER-627a3601-82da-4c6a-b9ad-49e2f90fda71",
"relation": "self",
"method": "PATCH",
"description": "Use this endpoint to update the amount or other values of a previous sales transaction using reference id."
},
{
"href": "https://api.pit.paygateway.com/transactions/creditsales/reference_id/MER-627a3601-82da-4c6a-b9ad-49e2f90fda71/voids",
"relation": "void",
"method": "PUT",
"description": "Use this endpoint to void a previous sales transaction using reference id."
},
{
"href": "https://api.pit.paygateway.com/transactions/creditsales/reference_id/MER-627a3601-82da-4c6a-b9ad-49e2f90fda71/returns",
"relation": "return",
"method": "POST",
"description": "Use this endpoint to create a returns transaction associated with a previous sales using reference id."
}
]
}
],
"reference_id": "MER-627a3601-82da-4c6a-b9ad-49e2f90fda71"
}