Paymentinstruments
Payment instruments are specific, concrete instances of a payment method, such as a credit card, individual cheque, or other form of payment. Payment providers require specific creation information, provided through third-party-defined payment instructions to instantiate valid payment instruments.
Read Payment Instruments from Profile
Reads a list of the shopper’s payment instruments.
Workflow
- Start with profile
GETthe link with rel: paymentinstruments- Render the response
Read Payment Instruments from Account
Reads a list of the account’s payment instruments.
Workflow
- Start with account
GETthe link with rel: paymentinstruments- Render the response
Read Payment Instrument
Reads a payment instrument from a list of payment instruments.
Workflow
- Start with profile payment instruments or account payment instruments
GETthe link with rel: element- Render the response
Response
Type: paymentinstruments.payment-instrument
| Name | Description | Type |
|---|---|---|
payment-instrument-identification-attributes | Payment instrument-specific attributes, underscoring the individual payment instrument and differentiating it from other instruments. These attributes might include a payment token or time to live. | object |
default-on-profile | Indicates whether a payment instrument is the default one for a profile. | boolean |
name | The payment instrument name. | string |
Sample
{
"self": {
"type": "paymentinstruments.payment-instrument",
"uri": "/paymentinstruments/mobee/mfston3dhfstqljtmnrteljugy4tcllcmqzgellbgq4wkyjrmi3wemrrgm=",
"href": "https://cortex.elasticpath.com/cortex/paymentinstruments/mobee/mfston3dhfstqljtmnrteljugy4tcllcmqzgellbgq4wkyjrmi3wemrrgm="
},
"messages": [],
"links": [
{
"rel": "paymentmethod",
"type": "paymentmethods.profile-payment-method",
"href": "https://cortex.elasticpath.com/cortex/paymentmethods/profiles/mobee/ovzwk4tumvzxiz3vnfsa=/geyggobtgiztaljrgvrdqljugy4dcllcg42tmljugjrggyrxhbqtonrxgy="
},
{
"rel": "paymentinstruments",
"type": "paymentinstruments.payment-instruments",
"href": "https://cortex.elasticpath.com/cortex/paymentinstruments/mobee"
}
],
"default-on-profile": true,
"name": "test",
"payment-instrument-identification-attributes": {}
}
Delete Payment Instrument
Delete the payment instrument from the profile or account.
Workflow
- Start with profile payment instruments or account payment instruments
GETthe link with rel: elementDELETEpayment instrument
Add Payment Instrument
Use to add a payment instrument to the profile or account.
Workflow
- Start with payment method
GETthe link with rel: paymentinstrumentform- Fill out the form
POSTthe form using the link with rel: createpaymentinstrumentaction
Request Fields
Type: paymentinstruments.payment-instrument-for-form
| Name | Description | Type |
|---|---|---|
default-on-profile | Indicates whether to set a payment instrument as the default one on a profile. | boolean |
name | The shopper identifiable name of a payment instrument, such as "My Amex" or "My Visa". | string |
payment-instrument-identification-form | Payment instrument-specific attributes, underscoring the individual payment instrument through dynamic fields required by the payment gateway for payment instrument creation. Populate these fields with payment instrument identification information returned by the third-party payment gateway, such as a payment token. | object |
billing-address | Billing address information to attach to the payment instrument. | object |
name | The customer name. | object |
given-name | The person’s given name. | string |
family-name | The person’s family name. | string |
address | The customer address. Address field names are based on the v.card specification. For more information on this specification, see v.card. | object |
street-address | The street address. | string |
extended-address | An extra field for address information. This field is optional. | string |
locality | The city name. | string |
region | The region name. A region typically corresponds to a province or a state of a country. | string |
postal-code | The postal code or zip code. | string |
country-name | The country name. | string |
phone-number | The phone number. | string |
organization | The organization. | string |
Read Default Payment Instrument
Reads the default payment instrument.
Workflow
- Start with profile payment instruments or account payment instruments
GETthe link with rel: default- Render the response
Response Fields
Type: paymentinstruments.payment-instrument
| Name | Description | Type |
|---|---|---|
payment-instrument-identification-attributes | Payment instrument-specific attributes, underscoring the individual payment instrument and differentiating it from other instruments. These attributes might include a payment token or time to live. | object |
default-on-profile | Indicates whether a payment instrument is the default one for a profile. | boolean |
name | The payment instrument name. | string |
Read Chosen Default Payment Instrument
Use the profile’s default payment instrument selector to read the chosen instrument.
Workflow
- Start with profile payment instruments or account payment instruments
GETthe link with rel: defaultinstrumentselectorGETthe link with rel: chosenGETthe link with rel: description- Render the response
Response Fields
Type: paymentinstruments.payment-instrument
| Name | Description | Type |
|---|---|---|
payment-instrument-identification-attributes | Payment instrument-specific attributes, underscoring the individual payment instrument and differentiating it from other instruments. These attributes might include a payment token or time to live. | object |
default-on-profile | Indicates whether a payment instrument is the default one for a profile. | boolean |
name | The payment instrument name. | string |
Read Default Payment Instrument Choice
Use the profile’s default payment instrument selector to read a choice.
Workflow
- Start with profile payment instruments or account payment instruments
GETthe link with rel: defaultinstrumentselectorGETthe link with rel: choiceGETthe link with rel: description- Render the response
Response Fields
Type: paymentinstruments.payment-instrument
| Name | Description | Type |
|---|---|---|
payment-instrument-identification-attributes | Payment instrument-specific attributes, underscoring the individual payment instrument and differentiating it from other instruments. These attributes might include a payment token or time to live. | object |
default-on-profile | Indicates whether a payment instrument is the default one for a profile. | boolean |
name | The payment instrument name. | string |
Select Default Payment Instrument
Use the profile’s default payment instrument selector to select a payment instrument.
Workflow
- Start with profile payment instruments or account payment instruments
GETthe link with rel: defaultinstrumentselectorGETthe link with rel: choicePOSTthe choice using the link with rel: selectaction