Loading...
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.
You must save the reference_id that you create in your request. To run follow-on transactions that link to the original transaction, you must include the reference_id as part of the endpoint URL. If you want to save the customer's card details to use for future transactions, you must include the create_token field in your request.
| 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-Partner-App-Name: {Name of integrating application}
{
"reference_id": "MER-41e40db1-02c8-4214-b2c8-1399aea79afa",
"card": {
"temporary_token": "111xx111-x11x-1xx1-1111-x11x1111x11x"
},
"customer": {
"billing_address": {
"line1": "123 Test Ave",
"postal_code": "55555"
}
},
"payment": {
"amount": "1",
"currency_code": "840"
},
"transaction": {
"country_code": "840",
"processing_indicators": {
"address_verification_service": true,
"generate_receipt": true
}
}
}{
"creditsale_id": "000000084344",
"status": "approved",
"approval_code": "343390",
"avs_response": "full_match",
"avs_response_description": "Match - Street Address, Match - Postal Code",
"processor_response": "DEVELOPMENT APPROVAL",
"card": {
"masked_card_number": "476173XXXXXX0010",
"cardholder_name": "test name",
"expiry_month": "12",
"expiry_year": "25",
"type": "visa"
},
"payment": {
"amount": "9.57",
"currency_code": "840",
"type": "credit"
},
"transaction": {
"batch_amount": "26.81",
"batch_number": "000060",
"entry_type": "keyed",
"language": "en-US"
},
"receipt": {
"text": {
"customer_receipt": "\nBatch # 000060\nTrans ID 000000084344\nOrder ID MER-645bc12f-82d7-45\n fb-9d87-39c54281636a\nTrans Type Purchase\nDate/Time 2023-06-16 12:59:02\nCard Type Visa\nCard Number XXXXXXXXXXXX0010\nEntry Method MANUAL\nApproval Code 343390\nAVS Y\n\nTotal Amount USD$9.57\n\n Approved - Thank You\n\n X____________________________________\n Signature: test name\n\nBuyer agrees to pay total amount above\naccording to cardholder's agreement with\nissuer.\n\n ****Customer Copy****",
"merchant_receipt": "\nBatch # 000060\nTrans ID 000000084344\nOrder ID MER-645bc12f-82d7-45\n fb-9d87-39c54281636a\nTrans Type Purchase\nDate/Time 2023-06-16 12:59:02\nCard Type Visa\nCard Number XXXXXXXXXXXX0010\nEntry Method MANUAL\nApproval Code 343390\nAVS Y\n\nTotal Amount USD$9.57\n\n Approved - Thank You\n\n X____________________________________\n Signature: test name\n\nBuyer agrees to pay total amount above\naccording to cardholder's agreement with\nissuer.\n\n ****Merchant Copy****"
},
"id": "84344",
"attributes": {
"authorization_agreement": "Buyer agrees to pay total amount above according to cardholder's agreement with issuer.",
"copy_label_customer": "****Customer Copy****",
"copy_label_merchant": "****Merchant Copy****",
"verbiage": "Approved - Thank You"
},
"labeled_attributes": {
"amount": {
"label": "Total Amount",
"value": "USD$9.57"
},
"approval_code": {
"label": "Approval Code",
"value": "343390"
},
"batch_number": {
"label": "Batch #",
"value": "000060"
},
"card_type": {
"label": "Card Type",
"value": "Visa"
},
"entry_method": {
"label": "Entry Method",
"value": "MANUAL"
},
"masked_card_number": {
"label": "Card Number",
"value": "XXXXXXXXXXXX0010"
},
"reference_id": {
"label": "Order ID",
"value": "MER-645bc12f-82d7-45fb-9d87-39c54281636a"
},
"total_amount": {
"label": "Total Amount",
"value": "USD$9.57"
},
"transaction_datetime": {
"label": "Date/Time",
"value": "2023-06-16 12:59:02"
},
"transaction_id": {
"label": "Trans ID",
"value": "000000084344"
},
"transaction_type": {
"label": "Trans Type",
"value": "Purchase"
}
}
},
"links": [
{
"creditsale_id": [
{
"href": "https://api.pit.paygateway.com/transactions/creditsales/000000084344",
"relation": "self",
"method": "GET",
"description": "Use this endpoint to retrieve a sales transaction."
},
{
"href": "https://api.pit.paygateway.com/transactions/creditsales/000000084344",
"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/000000084344/voids",
"relation": "void",
"method": "PUT",
"description": "Use this endpoint to void a previous sales transaction."
},
{
"href": "https://api.pit.paygateway.com/transactions/creditsales/000000084344/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-645bc12f-82d7-45fb-9d87-39c54281636a",
"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-645bc12f-82d7-45fb-9d87-39c54281636a",
"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-645bc12f-82d7-45fb-9d87-39c54281636a/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-645bc12f-82d7-45fb-9d87-39c54281636a/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-645bc12f-82d7-45fb-9d87-39c54281636a"
}