Payment links allows you to generate a link, send it to a customer via email/sms/etc, and then have the customer pay without the need for you to host your own checkout.

You can use the payment links endpoint to create a payment link with the data that will be displayed on the Gr4vy hosted page. The payment links API endpoint makes it easy to get create a new payment link.

curl -i -X POST "https://api.example.gr4vy.app/payment-links" \
    -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIi..." \
    -H "Content-Type: application/json" \
    -d '{
    	"currency":"AUD",
    	"country":"AU",
    	"amount":1000,
    	"metadata":{
    		"TypeOfPayment":"purchase",
    		"Carbon_FootPrint":"10"
    	},
    	"cart_items":[
    		{
    			"name":"Aloe",
    			"unit_amount":1000,
    			"quantity":1,
    			"sku":"aloe"
    		}
    	],
      "merchant_banner_url":"https://susies.store/logo.svg",
      "merchant_color":"#cf6b6b",
      "merchant_name":"Susie's Store",
      "merchant_message":"Thanks for your purchase at Susie's Store!",
      "merchant_terms_and_conditions_url":"https://susies.store/terms-and-conditions",
      "return_url":"https://susies.store/success"
    }'

On top of the merchant_* specific values, this API supports values that are going to be displayed by the Gr4vy hosted page and also passed to Embed to process the transaction.

These values are: amount, currency, country, metadata, cart_items, buyer, externalIdentifier, intent, paymentSource, statementDescriptor.

Please refer to the Embed options documentation for more information.

By creating a payment link you’re ready to send it to your customer to complete the payment.