Loading...
Capture an authorization to complete a sale and move the funds from the customer’s account to your merchant account. This operation finalizes a transaction that was previously authorized but not yet settled, ensuring payment is secured for goods or services delivered.
In order to perform a Capture you can use the ID (creditauth_id) assigned by the REST API which was returned in the transaction response. Alternatively, you can use the Reference ID (reference_id) you set in the transaction request. The tables below outline the URL to use in either case.
| Environment | HTTP Method | URL |
|---|---|---|
| Sandbox | POST | https://api.pit.paygateway.com/transactions/ |
| Production | POST | https://api.paygateway.com/transactions/ |
| Transaction Type | URL path |
|---|---|
| Authorization | {base_url}/creditauth/{creditauth_id}/creditcaptures or {base_url}/creditauth/reference_id/{reference_id}/creditcaptures |
Important: For authentication, you must include the required headers in each request. For more information, please refer to Authenticating Your Requests.
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}
{
"payment": {
"amount": "23.09",
"gratuity_eligible_amount": "10.00"
},
"transaction": {
"processing_indicators": {
"generate_receipt": true
},
"terminal": {
"certification_id": "OEXXXX.0",
"pos_type": "MOBILE"
}
},
"receipt": {
"signature_image": "iVBORw0KGgoAAAANSUhEUgAAAEAAAAAXBAMAAABJzFSiAAAAG1BMVEUAAAD////f39+/v79fX19/f38fHx8/Pz+fn5+3RGHDAAABPklEQVQokXWSu0/DMBDGDUoj",
"signature_format": "PNG"
}
}{
"creditcapture_id": "0000012345678903266",
"reference_id": "XAZR863990",
"status": "approved",
"approval_code": "ADB123",
"processor_response": "APPROVAL ADB123",
"card": {
"masked_card_number": "XXXXXXXXXXX5538",
"cardholder_name": "Joe Doe",
"expiry_month": "03",
"expiry_year": "35",
"type": "credit"
},
"payment": {
"amount": "23.09",
"gratuity_amount": "10.00",
"type": "credit"
},
"transaction": {
"batch_amount": "12.09",
"batch_number": "001333",
"language": "en-US",
"tracking_id": "TrackingID123"
},
"receipt": {
"id": "72845",
"text": {
"customer_receipt": "\\nBatch # 000161\\nTrans ID 000000141687\\nOrder ID PAYAPIa0155b35-420c-\\n 46a5-9b0a-f01ac0004a\\n 76\\nReceipt # 123456890\\nTrans Type Return\\nClerk ID Al090\\nDate/Time 2018-12-10 21:56:16\\nCard Type Visa\\nCard Number XXXXXXXXXXXX2222\\nEntry Legend MAG STRIPE\\nEntry Method CONTACTLESS\\nApproval Code 577279\\n\\nTotal Amount USD$132.00\\n\\n Approved - Thank You\\n\\n X____________________________________\\n Signature: Joe Doe\\n\\n ****Customer Copy****\\n Retain this copy for statement\\n verification",
"merchant_receipt": "\\nBatch # 000161\\nTrans ID 000000141687\\nOrder ID PAYAPIa0155b35-420c-\\n 46a5-9b0a-f01ac0004a\\n 76\\nReceipt # 123456890\\nTrans Type Return\\nClerk ID Al090\\nDate/Time 2018-12-10 21:56:16\\nCard Type Visa\\nCard Number XXXXXXXXXXXX2222\\nEntry Legend MAG STRIPE\\nEntry Method CONTACTLESS\\nApproval Code 577279\\n\\nTotal Amount USD$132.00\\n\\n Approved - Thank You\\n\\n X____________________________________\\n Signature: Joe Doe\\n\\n ****Merchant Copy****"
},
"validation_code": {
"label": "Total Amount",
"value": "$99.45 USD"
},
"attributes": {
"authorization_agreement": "I agree to pay above total amount according to card issuer agreement",
"call_issuer": "CALL ISSUER",
"copy_label_customer": "****Customer Copy**** Retain this copy for statement verification",
"copy_label_merchant": "MERCHANT COPY",
"merchant_address": "2578 West 600 North",
"merchant_footer": "Thank you. Come again.",
"merchant_header": "ABC Grocery",
"merchant_name": "ABC Stores",
"merchant_phone": "901-492-7269",
"merchant_policy": "Generally, merchandise purchased in store or online can be returned or exchanged within ninety (90) days of purchase with or without a receipt",
"verbiage": "Approved - Thank You"
},
"labeled_attributes": {
"amount": {
"label": "Total Amount",
"value": "$99.45 USD"
},
"approval_code": {
"label": "Total Amount",
"value": "$99.45 USD"
},
"authorization_response_code": {
"label": "Total Amount",
"value": "$99.45 USD"
},
"avs_response_code": {
"label": "Total Amount",
"value": "$99.45 USD"
},
"batch_number": {
"label": "Total Amount",
"value": "$99.45 USD"
},
"card_balance": {
"label": "Total Amount",
"value": "$99.45 USD"
},
"card_type": {
"label": "Total Amount",
"value": "$99.45 USD"
},
"cardsecurity_response_code": {
"label": "Total Amount",
"value": "$99.45 USD"
},
"clerk_id": {
"label": "Total Amount",
"value": "$99.45 USD"
},
"entry_legend": {
"label": "Total Amount",
"value": "$99.45 USD"
},
"entry_method": {
"label": "Total Amount",
"value": "$99.45 USD"
},
"gratuity_amount": {
"label": "Total Amount",
"value": "$99.45 USD"
},
"masked_card_number": {
"label": "Total Amount",
"value": "$99.45 USD"
},
"merchant_id": {
"label": "Total Amount",
"value": "$99.45 USD"
},
"original_auth_code": {
"label": "Total Amount",
"value": "$99.45 USD"
},
"payment_type": {
"label": "Total Amount",
"value": "$99.45 USD"
},
"number": {
"label": "Total Amount",
"value": "$99.45 USD"
},
"reference_id": {
"label": "Total Amount",
"value": "$99.45 USD"
},
"subtotal_amount": {
"label": "Total Amount",
"value": "$99.45 USD"
},
"total_amount": {
"label": "Total Amount",
"value": "$99.45 USD"
},
"transaction_datetime": {
"label": "Total Amount",
"value": "$99.45 USD"
},
"transaction_id": {
"label": "Total Amount",
"value": "$99.45 USD"
},
"transaction_type": {
"label": "Total Amount",
"value": "$99.45 USD"
},
"validation_code": {
"label": "Total Amount",
"value": "$99.45 USD"
}
}
},
"links": [
{
"creditcapture_id": [
{
"href": "https://api.paygateway.com/cnp-payments/sales/000000106821",
"relation": "self",
"method": "POST",
"description": "Use this endpoint to retrieve a previous sales transaction using reference id."
}
],
"reference_id": [
{
"href": "https://api.paygateway.com/cnp-payments/sales/000000106821",
"relation": "self",
"method": "POST",
"description": "Use this endpoint to retrieve a previous sales transaction using reference id."
}
]
}
]
}