Batches

Close a Batch

POST
/batches

Close a Batch without using the Global Payments Batch id

Closing a batch results in commencement of funding to the merchant all the transactions in that batch. Here you can close the current open batch without the unique batch id. Availability of this feature in production depends on your allowed live configuration. Please contact Global Payments before coding this feature to confirm it will be available to you when you go live.

Authorization

bearerAuth
AuthorizationBearer <token>

Access token from POST /accesstoken, sent as Authorization: Bearer <token>.

In: header

Header Parameters

X-GP-Version*string

The version of the API to execute the request.

Length1 <= length <= 50
Default"2021-03-22"

Request Body

application/json

account_id?string

A unique identifier that is used to identify and reference an instance of this resource. This id is used when actioning or referencing a specific account. Begins with the three letters, TRA.

Length1 <= length <= 50
account_name?string

A meaningful label that better identifies the account.

Length1 <= length <= 50
channel?string

Describes whether the transaction was processed in a face to face(CP) scenario or a Customer Not Present (CNP) scenario.

  • CP - A Customer Present transaction is when the payer and the merchant are in direct face to face contact when exchanging payment method information to fulfill a transaction. e.g. in a store and paying at the counter that is attended by a clerk.
  • CNP - A Customer NOT Present transaction is when the payer and the merchant are not together when exchanging payment method information to fulfill a transaction. e.g. a transaction executed from a merchant's website or over the phone

Value in

  • "CP"
  • "CNP"
currency?string

The currency of the amount in ISO-4217(alpha-3)

Length3 <= length <= 3
country?string

This is the country the merchant is domiciled in. For example, if the merchant is based in Canada it must be set to CA.if the merchant is based in England it must be set to GB.if the merchant is based in USA it must be set to US.The country in ISO-3166-1(alpha-2 code) format.

Value in

  • "AD"
  • "AE"
  • "AF"
  • "AG"
  • "AI"
  • "AL"
  • "AM"
  • "AO"
  • "AQ"
  • "AR"
  • "AS"
  • "AT"
  • "AU"
  • "AW"
  • "AX"
  • "AZ"
  • "BA"
  • "BB"
  • "BD"
  • "BE"
  • "BF"
  • "BG"
  • "BH"
  • "BI"
  • "BJ"
  • "BL"
  • "BM"
  • "BN"
  • "BO"
  • "BQ"
  • "BR"
  • "BS"
  • "BT"
  • "BV"
  • "BW"
  • "BY"
  • "BZ"
  • "CA"
  • "CC"
  • "CD"
  • "CF"
  • "CG"
  • "CH"
  • "CI"
  • "CK"
  • "CL"
  • "CM"
  • "CN"
  • "CO"
  • "CR"
  • "CU"
  • "CV"
  • "CW"
  • "CX"
  • "CY"
  • "CZ"
  • "DE"
  • "DJ"
  • "DK"
  • "DM"
  • "DO"
  • "DZ"
  • "EC"
  • "EE"
  • "EG"
  • "EH"
  • "ER"
  • "ES"
  • "ET"
  • "FI"
  • "FJ"
  • "FK"
  • "FM"
  • "FO"
  • "FR"
  • "GA"
  • "GB"
  • "GD"
  • "GE"
  • "GF"
  • "GG"
  • "GH"
  • "GI"
  • "GL"
  • "GM"
  • "GN"
  • "GP"
  • "GQ"
  • "GR"
  • "GS"
  • "GT"
  • "GU"
  • "GW"
  • "GY"
  • "HK"
  • "HM"
  • "HN"
  • "HR"
  • "HT"
  • "HU"
  • "ID"
  • "IE"
  • "IL"
  • "IM"
  • "IN"
  • "IO"
  • "IQ"
  • "IR"
  • "IS"
  • "IT"
  • "JE"
  • "JM"
  • "JO"
  • "JP"
  • "KE"
  • "KG"
  • "KH"
  • "KI"
  • "KM"
  • "KN"
  • "KP"
  • "KR"
  • "KW"
  • "KY"
  • "KZ"
  • "LA"
  • "LB"
  • "LC"
  • "LI"
  • "LK"
  • "LR"
  • "LS"
  • "LT"
  • "LU"
  • "LV"
  • "LY"
  • "MA"
  • "MC"
  • "MD"
  • "ME"
  • "MF"
  • "MG"
  • "MH"
  • "MK"
  • "ML"
  • "MM"
  • "MN"
  • "MO"
  • "MP"
  • "MQ"
  • "MR"
  • "MS"
  • "MT"
  • "MU"
  • "MV"
  • "MW"
  • "MX"
  • "MY"
  • "MZ"
  • "NA"
  • "NC"
  • "NE"
  • "NF"
  • "NG"
  • "NI"
  • "NL"
  • "NO"
  • "NP"
  • "NR"
  • "NU"
  • "NZ"
  • "OM"
  • "PA"
  • "PE"
  • "PF"
  • "PG"
  • "PH"
  • "PK"
  • "PL"
  • "PM"
  • "PN"
  • "PR"
  • "PS"
  • "PT"
  • "PW"
  • "PY"
  • "QA"
  • "RE"
  • "RO"
  • "RS"
  • "RU"
  • "RW"
  • "SA"
  • "SB"
  • "SC"
  • "SD"
  • "SE"
  • "SG"
  • "SH"
  • "SI"
  • "SJ"
  • "SK"
  • "SL"
  • "SM"
  • "SN"
  • "SO"
  • "SR"
  • "SS"
  • "ST"
  • "SV"
  • "SX"
  • "SY"
  • "SZ"
  • "TC"
  • "TD"
  • "TF"
  • "TG"
  • "TH"
  • "TJ"
  • "TK"
  • "TL"
  • "TM"
  • "TN"
  • "TO"
  • "TR"
  • "TT"
  • "TV"
  • "TW"
  • "TZ"
  • "UA"
  • "UG"
  • "UM"
  • "US"
  • "UY"
  • "UZ"
  • "VA"
  • "VC"
  • "VE"
  • "VG"
  • "VI"
  • "VN"
  • "VU"
  • "WF"
  • "WS"
  • "YE"
  • "YT"
  • "ZA"
  • "ZM"
  • "ZW"
payment_methods?array<>

Indicates the Payment Methods used to carry out the transactions in the batch

Response Body

application/json

curl -X POST "https://example.com/batches" \  -H "X-GP-Version: 2021-03-22" \  -H "Content-Type: application/json" \  -d '{    "account_name": "transaction_account",    "channel": "CNP",    "currency": "MXN",    "country": "MX",    "payment_methods": [      "APM"    ]  }'
{  "id": "BAT_855049-899",  "status": "OPEN",  "time_created": "2021-05-03T21:23:39.718Z",  "time_last_updated": "2021-05-03T21:23:39.718Z",  "time_closed": "2021-05-03T21:23:39.718Z",  "open_action_id": "ACT_uzFr7t4VOqxdLDI44hHmXIjHtOOE8d",  "close_action_id": "ACT_uzFr7t4VOqxdLDI44hHmXIjHtOOE8d",  "merchant_id": "MER_A6A1EC44522F96630ABEA17A",  "merchant_name": "ABC INDUSTRIES",  "account_id": "TRA_86920f927028745yt34d077d88beb29b",  "account_name": "transaction_processing",  "site_reference": "string",  "device_reference": "string",  "transaction_count": 126,  "amount": "12000",  "currency": "USD",  "gratuity_amount": "500",  "sales": {    "count": 123,    "amount": "12300"  },  "refunds": {    "count": 3,    "amount": "300"  },  "funding_debit": {    "count": 100,    "amount": "10000"  },  "funding_credit": {    "count": 26,    "amount": "2300"  },  "brand_breakdown": [    {      "brand": "VISA",      "amount": "8300",      "count": 83,      "gratuity_amount": "500",      "sales": {        "count": 80,        "amount": "8000"      },      "refunds": {        "count": 3,        "amount": "300"      },      "funding_debit": {        "count": 80,        "amount": "8000"      },      "funding_credit": {        "count": 3,        "amount": "300"      }    }  ],  "host_breakdown": {    "merchant_name": "MERCHANT ABC INC.",    "reference": "string",    "amount": "12300",    "count": 126,    "funding_debit": {      "sales": {        "count": 80,        "amount": "8000"      },      "refunds": {        "count": 3,        "amount": "300"      }    },    "funding_credit": {      "sales": {        "count": 0,        "amount": "string"      },      "refunds": {        "count": 3,        "amount": "300"      }    }  },  "action": {    "id": "ACT_uzFr7t4VOqxdLDI44hHmXIjHtOOE8d",    "type": "BATCH_SINGLE",    "time_created": "2021-05-03T21:23:39.718Z",    "result_code": "SUCCESS",    "app_id": "uzFr7t4VOqxdLDI44hHmXIjHtOOE8d",    "app_name": "my_lovely_app"  }}