Payment Methods

Create

POST
/payment-methods

Create Payment Method

Create a stored payment method on the Global Payments system and return a unique Global Payments ID that can be used to create future Sale or Refund Transactions.

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"
X-GP-Idempotency?string

Integrator generated value submitted in the request header that is checked to ensure the same value has not been seen in the last 24 hours. It is used to ensure idempotency is maintained with this action.

Length1 <= length <= 50

Request Body

application/json

account_name?string

A meaningful label for the merchant account set by Global Payments.

Length1 <= length <= 50
reference*string

Merchant defined field to uniquely reference the stored payment method.

Length1 <= length <= 50
usage_mode?string

Indicates the behaviour of the payment method token.

  • SINGLE - This value must be used if using the Hosted Fields or the Drop-in UI integration types. When creating the payment method token, this option ensures the payment method token is temporary and will be removed once a transaction is executed or after a short period of time.
  • MULTIPLE - When creating the payment method token, this indicates it is permanent and can be used to create many transactions.
  • USE_CARD_NUMBER - When using the payment method token to transaction process, this indicates to use the card number also known as the PAN or FPAN when bothe the card number and the network token are available.
  • USE_NETWORK_TOKEN - When using the payment method token to transaction process, this indicates to use the network token instead of the card number if both are available.
Length1 <= length <= 50
Default"MULTIPLE"

Value in

  • "SINGLE"
  • "MULTIPLE"
  • "USE_CARD_NUMBER"
  • "USE_NETWORK_TOKEN"
fingerprint_mode?string

Indicates whether to execute the fingerprint signature functionality.

  • ALWAYS - Always check and create the fingerprint value regardless of the result of the card authorization.
  • ON_SUCCESS - Always check and create the fingerprint value when the card authorization is successful.
Length1 <= length <= 50

Value in

  • "ALWAYS"
  • "ON_SUCCESS"
name?string

The name of the owner of the payment method. For example the cardholder's name.

Lengthlength <= 100
auto_updater?string

Indicates whether this payment token should be enabled for account updater services. Availability of this is dependent on your live configuration

Value in

  • "ENABLE"
  • "DISABLE"
payer?
card*

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/payment-methods" \  -H "X-GP-Version: 2021-03-22" \  -H "Content-Type: application/json" \  -d '{    "reference": "CustABC_Card_1",    "usage_mode": "MULTIPLE",    "card": {      "number": "4263970000005262",      "expiry_month": "05",      "expiry_year": "25",      "cvv": "233"    }  }'
{  "id": "PMT_f5bbdfde-3010-4802-8f5d-1cdb2a2381c2",  "time_created": "2021-05-03T21:23:39.718Z",  "merchant_id": "MER_c4c0df11039c48a9b63701adeaa296c3",  "merchant_name": "Sandbox_merchant_2",  "account_id": "TRA_86920f927028745yt34d077d88beb29b",  "account_name": "Tokenization",  "fingerprint_presence_indicator": "NEW",  "fingerprint": "string",  "reference": "CustABC_Card_1",  "usage_mode": "SINGLE",  "name": "John's payment method",  "auto_updater": "ENABLE",  "payer": {    "id": "PYR_oOAH6BClraQWS3Qy07dh7tZAN3X2nW"  },  "card": {    "masked_number_last4": "xxxxxxxxxxxx5262",    "expiry_month": "05",    "expiry_year": "25",    "brand": "VISA",    "network_token": "4895370019221065",    "masked_network_token_last4": "xxxxxxxxxxxx5262",    "network_token_expiry_month": "05",    "network_token_expiry_year": "25",    "brand_reference": "000000321000010"  },  "action": {    "id": "ACT_uzFr7t4VOqxdLDI44hHmXIjHtOOE8d",    "type": "PAYMENT_METHOD_CREATE",    "time_created": "2021-05-03T21:23:39.718Z",    "result_code": "SUCCESS",    "app_id": "uzFr7t4VOqxdLDI44hHmXIjHtOOE8d",    "app_name": "my_lovely_app"  }}