Assuming you have already activated Alfamart as payment method and set your prefix in dashboard settings, use the following steps for generating a payment code:
Using XenInvoice
- Once end customer opens invoice and Alfamart is selected as the payment method, a payment code will be generated automatically
Using direct API
- Send a POST request to https://api.xendit.co/fixed_payment_code
- If you don’t provide a payment code, one will be automatically generated for you
- For more information on our retail outlet apis, see our api reference docs.