Payments
- Transactions
- Buyers
- Checkout Sessions
- Payment links
- Payment options
- Payouts
- Refunds
- Sessions
- Settlement records
Instruments
- Card schemes
- Digital wallets
- Gift cards
- Payment methods
- Payment method definitions
Vault
- Account updater
- Network tokens
- Payment service tokens
- Vault Forward
- Vault Forward endpoints
- Vault Forward authentication
Connections
- All services
- Payment services
- Digital wallets
- Anti-fraud services
- Gift-card services
Dashboard
- Flow
- Merchant accounts
- Reports
- Report executions
List payment links
Lists all payment links for an account. Sorted by last updated at.
curl --request GET \
--url https://api.{gr4vy_id}.gr4vy.app/payment-links \
--header 'Authorization: Bearer <token>'
{
"items": [
{
"id": "8d3fe99b-1422-42e6-bbb3-932d95ae5f79",
"type": "payment_link",
"amount": 1299,
"currency": "USD",
"created_at": "2022-01-01T12:00:00+00:00",
"updated_at": "2022-01-01T12:00:00+00:00",
"expires_at": "2022-01-01T12:00:00+00:00",
"status": "active",
"external_identifier": "payment-link-123",
"statement_descriptor": {
"name": "GR4VY",
"description": "Card payment",
"city": "London",
"country": "US",
"phone_number": "+1234567890",
"url": "www.gr4vy.com"
},
"locale": "en",
"merchant_name": "Gr4vy",
"merchant_url": "https://gr4vy.com",
"merchant_banner_url": "https://gr4vy.com/banner.png",
"merchant_color": "#FF0000",
"merchant_message": "Thank you for shopping with us!",
"merchant_terms_and_conditions_url": "https://gr4vy.com/terms",
"merchant_favicon_url": "https://gr4vy.com/favicon.png",
"country": "US",
"intent": "authorize",
"return_url": "https://gr4vy.com/return",
"cart_items": [
{
"name": "GoPro HERO9 Camcorder",
"quantity": 1,
"unit_amount": 37999,
"discount_amount": 0,
"tax_amount": 0,
"external_identifier": "item-789123",
"sku": "sku-789123",
"product_url": "https://example.com/items/gopro",
"image_url": "https://example.com/images/items/gopro.png",
"categories": [
"<string>"
],
"product_type": "physical"
}
],
"metadata": {
"key": "value"
},
"payment_source": "recurring",
"buyer": {
"type": "buyer",
"id": "fe26475d-ec3e-4884-9553-f7356683f7f9",
"billing_details": {
"type": "billing-details",
"first_name": "John",
"last_name": "Lunn",
"email_address": "john@example.com",
"phone_number": "+1234567890",
"address": {
"city": "London",
"country": "GB",
"postal_code": "789123",
"state": "Greater London",
"state_code": "GB-LND",
"house_number_or_name": "10",
"line1": "10 Oxford Street",
"line2": "New Oxford Court",
"organization": "Gr4vy"
},
"tax_id": {
"value": "12345678931",
"kind": "gb.vat"
}
},
"display_name": "John L.",
"external_identifier": "user-789123",
"account_number": "1234567"
},
"shipping_details": {
"type": "shipping-details",
"id": "8724fd24-5489-4a5d-90fd-0604df7d3b83",
"buyer_id": "8724fd24-5489-4a5d-90fd-0604df7d3b83",
"first_name": "John",
"last_name": "Lunn",
"email_address": "john@example.com",
"phone_number": "+1234567890",
"address": {
"city": "London",
"country": "GB",
"postal_code": "789123",
"state": "Greater London",
"state_code": "GB-LND",
"house_number_or_name": "10",
"line1": "10 Oxford Street",
"line2": "New Oxford Court",
"organization": "Gr4vy"
}
}
}
],
"limit": 1,
"next_cursor": "ZXhhbXBsZTE",
"previous_cursor": null
}
This endpoint requires the payment-links.read
scope.
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Response
A list of payment links.
A list of payment links.
The ID of a payment link.
"8d3fe99b-1422-42e6-bbb3-932d95ae5f79"
The type of this resource. Is always payment_link
.
payment_link
"payment_link"
The monetary amount for this payment link, in the smallest
currency unit for the given currency, for example 1299
cents to create
an authorization for $12.99
.
1299
A supported ISO-4217 currency code.
"USD"
The date and time when this payment link was created.
"2022-01-01T12:00:00+00:00"
The date and time when this payment link was created.
"2022-01-01T12:00:00+00:00"
The date and time when this payment link expires.
"2022-01-01T12:00:00+00:00"
active
, expired
"active"
A value that can be used to match the payment link against your own records.
1 - 200
"payment-link-123"
The statement descriptor is the text to be shown on the buyer's statements.
The specific usage of these fields will depend on the capabilities of the underlying PSP and bank. As a typical example, 'name' and 'description' could be concatenated using '* ' as a separator, and then the resulting descriptor would be truncated to 22 characters by the issuing bank.
Reflects your doing business as (DBA) name.
Other validations:
- Contains only Latin characters.
- Contain at least one letter
- Does not contain any of the special characters
< > \ ' " *
- Supports:
- Lower case:
a-z
- Upper case:
A-Z
- Numbers:
0-9
- Spaces:
- Special characters:
. , _ - ? + /
.
5 - 22
"GR4VY"
A short description about the purchase.
Other validations:
- Contains only Latin characters.
- Contain at least one letter
- Does not contain any of the special characters
< > \ ' " *
- Supports:
- Lower case:
a-z
- Upper case:
A-Z
- Numbers:
0-9
- Spaces:
- Special characters:
. , _ - ? + /
.
5 - 22
"Card payment"
The merchant's city to be displayed in a statement descriptor.
1 - 13
"London"
The 2-letter ISO country code of the merchant to be displayed in a statement descriptor.
"US"
The value in the phone number field of a customer's statement which should be formatted according to the E164 number standard.
5 - 20
"+1234567890"
The merchant's URL to be displayed in a statement descriptor.
1 - 13
"www.gr4vy.com"
The locale used to translate text within the payment link.
en
, en-GB
, es
, pt
, pt-BR
"en"
The name of the merchant to display on the payment link.
100
"Gr4vy"
The URL of the merchant to display on the payment link.
"https://gr4vy.com"
The URL of the merchant banner to display on the payment link.
"https://gr4vy.com/banner.png"
The color code of the merchant to display on the payment link.
"#FF0000"
The message to display on the payment link.
255
"Thank you for shopping with us!"
The URL of the merchant terms and conditions to display on the payment link.
"https://gr4vy.com/terms"
The URL of the merchant favicon icon.
"https://gr4vy.com/favicon.png"
The 2-letter ISO code of the country of the transaction. This is used to filter the payment services that is used to process the transaction.
"US"
The intent of the payment link.
authorize
, capture
"authorize"
The URL to redirect the buyer to after payment.
"https://gr4vy.com/return"
An array of cart items that represents the line items of a payment link.
A cart item that represents a single cart line item for a transaction. Note that some optional properties are required for certain payment service providers. If no value is set for these properties, we will use their default value.
If the total due to be paid for the item is required by the payment service provider, generally referred to as the "total amount", the formula below will usually be used to calculate this amount:
(unit_amount * quantity) - discount_amount + tax_amount
It's highly recommended that the total amount to pay for all items should match the transaction's amount to reduce the risk of the transaction being declined by the payment service provider.
The name of the cart item. The value you set for this property may be truncated if the maximum length accepted by a payment service provider is less than 255 characters.
255
"GoPro HERO9 Camcorder"
The quantity of this item in the cart. This value cannot be negative or zero.
1 <= x <= 99999999
1
The amount for an individual item represented as a monetary amount
in the smallest currency unit for the given currency, for example
1299
USD cents represents $12.99
.
The amount sent through to the payment processor as unitary amount
will be calculated to include the discount and tax values sent
as part of this cart item.
0 <= x <= 99999999
37999
The amount discounted for this item represented as a monetary amount
in the smallest currency unit for the given currency, for example 1299
USD cents represents $12.99
.
Please note that this amount is for the total of the cart item and not for an individual item. For example, if the quantity is 5, this value should be the total discount amount for 5 of the cart item.
You might see unexpected failed transactions if the discount_amount
can
not be equally divided by the quantity
value. This is due to the fact
that some payment services require this amount to be specified per unit.
In this situation we recommend splitting this item into separate items, each with their own specific discount.
0 <= x <= 99999999
0
The tax amount for this item represented as a monetary amount
in the smallest currency unit for the given currency, for example 1299
USD cents represents $12.99
.
Please not that this amount is for the total of the cart item and not for an individual item. For example, if the quantity is 5, this value should be the total tax amount for 5 of the cart item.
You might see unexpected failed transactions if the tax_amount
can
not be equally divided by the quantity
value. This is due to the fact
that some payment services require this amount to be specified per unit.
In this situation we recommend splitting this item into separate items, each with their own specific tax amount.
0 <= x <= 99999999
0
An external identifier for the cart item. This can be set to any value and is not sent to the payment service.
200
"item-789123"
The SKU for the item.
200
"sku-789123"
The product URL for the item.
2083
"https://example.com/items/gopro"
The URL for the image of the item.
2083
"https://example.com/images/items/gopro.png"
A list of strings containing product categories for the item. Max length per item: 50.
The product type of the cart item.
physical
, discount
, shipping_fee
, sales_tax
, digital
, gift_card
, store_credit
, surcharge
"physical"
Any additional information about the payment link that you would like to store as key-value pairs. This data is passed to payment service providers that support it.
{ "key": "value" }
The source of the payment link. Defaults to ecommerce
.
ecommerce
, moto
, recurring
, installment
, card_on_file
"recurring"
The buyer used for this transaction.
The type of this resource. Is always buyer
.
buyer
"buyer"
The unique Gr4vy ID for this buyer.
"fe26475d-ec3e-4884-9553-f7356683f7f9"
The billing details associated with the buyer, which include the address and tax ID.
The type of this resource. Is always billing-details
.
billing-details
"billing-details"
The first name(s) or given name of the buyer.
1 - 255
"John"
The last name, or family name, of the buyer.
1 - 255
"Lunn"
The email address of the buyer.
1 - 320
"john@example.com"
The phone number of the buyer. This number is formatted according to the E164 number standard.
1 - 50
"+1234567890"
The billing address of the buyer.
The city for the address.
1 - 100
"London"
The country for the address in ISO 3166 format.
2
"GB"
The postal code or zip code for the address.
1 - 50
"789123"
The state, county, or province for the address.
1 - 255
"Greater London"
The code of state, county, or province for the address in ISO 3166-2 format.
4 - 6
"GB-LND"
The house number or name for the address. Not all payment services use this field but some do.
1 - 255
"10"
The first line of the address.
1 - 255
"10 Oxford Street"
The second line of the address.
1 - 255
"New Oxford Court"
The optional name of the company or organisation to add to the address.
1 - 255
"Gr4vy"
The tax information associated with the billing details.
The tax ID for the buyer.
1 - 50
"12345678931"
The kind of tax ID.
ae.trn
, au.abn
, ar.dni
, ar.cuil
, ar.cuit
, br.cnpj
, br.cpf
, ca.bn
, ca.gst_hst
, ca.pst_bc
, ca.pst_mb
, ca.pst_sk
, ca.qst
, ch.vat
, cl.tin
, es.cif
, eu.vat
, gb.vat
, hk.br
, id.nik
, id.npwp
, in.gst
, jp.cn
, jp.rn
, kr.brn
, li.uid
, mx.curp
, my.frp
, my.itn
, my.nric
, my.sst
, no.vat
, nz.gst
, ph.tin
, ru.inn
, ru.kpp
, sa.vat
, sg.gst
, sg.uen
, th.id
, th.vat
, tw.vat
, us.ein
, za.vat
"gb.vat"
A unique name for this buyer which is used in the Gr4vy admin panel to give a buyer a human readable name.
1 - 200
"John L."
An external identifier that can be used to match the buyer against your own records.
1 - 200
"user-789123"
The source account number to perform an account funding transaction.
1 - 255
"1234567"
Shipping details for the payment link.
The type of this resource. Is always shipping-details
.
shipping-details
"shipping-details"
The unique ID for a buyer's shipping detail.
"8724fd24-5489-4a5d-90fd-0604df7d3b83"
The unique ID for a buyer.
"8724fd24-5489-4a5d-90fd-0604df7d3b83"
The first name(s) or given name of the buyer.
1 - 255
"John"
The last name, or family name, of the buyer.
1 - 255
"Lunn"
The email address of the buyer.
1 - 320
"john@example.com"
The phone number of the buyer. This number is formatted according to the E164 number standard.
1 - 50
"+1234567890"
The physical shipping address associated to this buyer.
The city for the address.
1 - 100
"London"
The country for the address in ISO 3166 format.
2
"GB"
The postal code or zip code for the address.
1 - 50
"789123"
The state, county, or province for the address.
1 - 255
"Greater London"
The code of state, county, or province for the address in ISO 3166-2 format.
4 - 6
"GB-LND"
The house number or name for the address. Not all payment services use this field but some do.
1 - 255
"10"
The first line of the address.
1 - 255
"10 Oxford Street"
The second line of the address.
1 - 255
"New Oxford Court"
The optional name of the company or organisation to add to the address.
1 - 255
"Gr4vy"
The limit applied to request. This represents the number of items that are at maximum returned by this request.
1 <= x <= 100
1
The cursor that represents the next page of results. Use the cursor
query
parameter to fetch this page of items.
1 - 1000
"ZXhhbXBsZTE"
The cursor that represents the next page of results. Use the cursor
query
parameter to fetch this page of items.
1 - 1000
null
Was this page helpful?
curl --request GET \
--url https://api.{gr4vy_id}.gr4vy.app/payment-links \
--header 'Authorization: Bearer <token>'
{
"items": [
{
"id": "8d3fe99b-1422-42e6-bbb3-932d95ae5f79",
"type": "payment_link",
"amount": 1299,
"currency": "USD",
"created_at": "2022-01-01T12:00:00+00:00",
"updated_at": "2022-01-01T12:00:00+00:00",
"expires_at": "2022-01-01T12:00:00+00:00",
"status": "active",
"external_identifier": "payment-link-123",
"statement_descriptor": {
"name": "GR4VY",
"description": "Card payment",
"city": "London",
"country": "US",
"phone_number": "+1234567890",
"url": "www.gr4vy.com"
},
"locale": "en",
"merchant_name": "Gr4vy",
"merchant_url": "https://gr4vy.com",
"merchant_banner_url": "https://gr4vy.com/banner.png",
"merchant_color": "#FF0000",
"merchant_message": "Thank you for shopping with us!",
"merchant_terms_and_conditions_url": "https://gr4vy.com/terms",
"merchant_favicon_url": "https://gr4vy.com/favicon.png",
"country": "US",
"intent": "authorize",
"return_url": "https://gr4vy.com/return",
"cart_items": [
{
"name": "GoPro HERO9 Camcorder",
"quantity": 1,
"unit_amount": 37999,
"discount_amount": 0,
"tax_amount": 0,
"external_identifier": "item-789123",
"sku": "sku-789123",
"product_url": "https://example.com/items/gopro",
"image_url": "https://example.com/images/items/gopro.png",
"categories": [
"<string>"
],
"product_type": "physical"
}
],
"metadata": {
"key": "value"
},
"payment_source": "recurring",
"buyer": {
"type": "buyer",
"id": "fe26475d-ec3e-4884-9553-f7356683f7f9",
"billing_details": {
"type": "billing-details",
"first_name": "John",
"last_name": "Lunn",
"email_address": "john@example.com",
"phone_number": "+1234567890",
"address": {
"city": "London",
"country": "GB",
"postal_code": "789123",
"state": "Greater London",
"state_code": "GB-LND",
"house_number_or_name": "10",
"line1": "10 Oxford Street",
"line2": "New Oxford Court",
"organization": "Gr4vy"
},
"tax_id": {
"value": "12345678931",
"kind": "gb.vat"
}
},
"display_name": "John L.",
"external_identifier": "user-789123",
"account_number": "1234567"
},
"shipping_details": {
"type": "shipping-details",
"id": "8724fd24-5489-4a5d-90fd-0604df7d3b83",
"buyer_id": "8724fd24-5489-4a5d-90fd-0604df7d3b83",
"first_name": "John",
"last_name": "Lunn",
"email_address": "john@example.com",
"phone_number": "+1234567890",
"address": {
"city": "London",
"country": "GB",
"postal_code": "789123",
"state": "Greater London",
"state_code": "GB-LND",
"house_number_or_name": "10",
"line1": "10 Oxford Street",
"line2": "New Oxford Court",
"organization": "Gr4vy"
}
}
}
],
"limit": 1,
"next_cursor": "ZXhhbXBsZTE",
"previous_cursor": null
}