Consents

Create a Consent

POST
/consents

Create a consent on the Global Payments system to obtain authorization from the payer, allowing Global Payments to collect, use, and disclose their personal information to initiate the payment process.

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_name*string

A meaningful label that better identifies the GPAPI 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.

Default"CNP"

Value in

  • "CP"
  • "CNP"
merchant_category_code?string

A four-digit number used to classify the merchant into an industry or market segment.

Length1 <= length <= 50
reference*string

Merchant defined field to reference this consent request.

Length8 <= length <= 50
order?
addresses?array<>
fees?array<>
payment_method*
supported_payment_methods*array<>

Specifies the list of payment methods the merchant supports for the transaction

Response Body

application/json

curl -X POST "https://example.com/consents" \  -H "X-GP-Version: 2021-03-22" \  -H "Content-Type: application/json" \  -d '{    "account_name": "transaction_processing",    "channel": "CNP",    "reference": "becf9f3e-4d33-459c-8ed2-0c4affc9555e",    "merchant_category_code": "String",    "addresses": [      {        "functions": [          "BUSINESS"        ],        "building_name": "Winners",        "reference": "Clothing store",        "line_1": " string",        "line_2": "string",        "line_3": "string",        "city": "string",        "state": "ON",        "postal_code": "N1T 0G9",        "country": "Canada",        "po_box_number": "1234"      }    ],    "order": {      "reference": "James_order",      "delivery_timeframe": "STANDARD",      "shipping_type": "SINGLE",      "shipping_cost": "600",      "amount": "4100",      "currency": "CAD",      "tax_amount": "700",      "items": [        {          "label": "T-shit Red",          "reference": "ORD-23455",          "type": "OTHER",          "amount": "1250",          "quantity": "2",          "description": "Red t-shirt Zango",          "payment_type": "SINGLE"        }      ]    },    "fees": [      {        "name": "fast track fee",        "amount": "200"      },      {        "name": "gift wrap fee",        "amount": "100"      }    ],    "payment_method": {      "digital_wallet": {        "provider": "KONEK"      }    },    "supported_payment_methods": [      "MASTERCARD_CREDIT",      "MASTERCARD_DEBIT",      "VISA_CREDIT",      "VISA_DEBIT",      "AMEX_CREDIT",      "BANK_TRANSFER_SAVINGS",      "BANK_TRANSFER_CHECKING",      "BANK_TRANSFER_LINE_OF_CREDIT"    ]  }'
{  "id": "CON_2ee5480308664428bef46d1094f22adc",  "time_created": "2021-05-03T21:23:39.718Z",  "status": "INITIATED",  "merchant_id": "MER_A6A1EC44522F96630ABEA17A",  "merchant_name": "ABC INDUSTRIES",  "account_id": "TRA_86920f927028745yt34d077d88beb29b",  "account_name": "transaction_processing",  "reference": "becf9f3e-4d33-459c-8ed2-0c4affc9555e",  "dba": "merchantname",  "device": {    "session_reference": "device_profile_session_id"  },  "order": {    "amount": "10000",    "currency": "CAD",    "tax_amount": "600",    "item_amount": "6000"  },  "payment_method": {    "digital_wallet": {      "provider": "KONEK",      "reference": "2ee5480308664428bef46d1094f22adc",      "provider_reference": "2ee54803086tyui4567d1094f22adc"    }  },  "action": {    "id": "ACT_uzFr7t4VOqxdLDI44hHmXIjHtOOE8d",    "type": "CONSENT_CREATE",    "time_created": "2021-05-03T21:23:39.718Z",    "result_code": "SUCCESS",    "app_id": "uzFr7t4VOqxdLDI44hHmXIjHtOOE8d",    "app_name": "my_lovely_app"  }}