import Gmt from 'gmt-typescript-sdk';const client = new Gmt({ apiKey: process.env['GMT_API_KEY'], // This is the default and can be omitted});const response = await client.purchases.refund(12345);console.log(response.purchase);
Refunds a purchase if verification code was not received within 20 minutes.
Requirements:
Status PENDING, code not received
At least 20 minutes since purchase creation
POST
/
v1
/
purchases
/
{purchase_id}
/
refund
JavaScript
import Gmt from 'gmt-typescript-sdk';const client = new Gmt({ apiKey: process.env['GMT_API_KEY'], // This is the default and can be omitted});const response = await client.purchases.refund(12345);console.log(response.purchase);