Create Maya Mini App Payment

POST https://op-sandbox.paymaya.com/merchant/payments


This API endpoint uses Bearer Authentication, which relies on the Client Credentials Token (access_token) generated during OAuth 2.0 Authentication using the client_credentials grant type. You must provide this token as part of the Authorization header.

--header Authorization: Bearer <access_token>

Recipes


Technical Guide:

Related Guide:


Request Payload

Request Header

AttributeTypeFormatDescription
Content-Type REQUIREDstringapplication/jsonSpecifies the media type of the request
Request-Reference-No REQUIREDstringUUIDv4Unique reference identifier for tracking the request
Authorization REQUIREDstringJWSThe Client Credentials Token (access_token) generated by Maya during OAuth 2.0 Authentication using the client_credentials grant type

Example: Bearer {access_token}
X-Authorization REQUIREDstringJWEThe Customer Access Token (accessToken); a valid customer access token obtained from Maya through either your session URL or acquired by refreshing the tokens , whichever is the most recent or valid value

Request Body

AttributeTypeFormatDescription
p2mId REQUIREDstringAn identifier for your merchant account; The value will be provided by Maya during onboarding
amount REQUIREDobjectAn object for the base transaction amount
amount.currency REQUIREDstringISO 4217 Alpha-3 Currency code of the amount
amount.value REQUIREDfloat0.001 to 9999999999.99Transaction amount in the exponent/decimal notation of the provided currency

Response Payload

Response Body

AttributeTypeFormatDescription
id REQUIREDstringUUIDv4Payment ID referencing to the payment record created
p2mId REQUIREDstringAn identifier for your merchant account; The value will be provided by Maya during onboarding
requestReferenceNumber REQUIREDstringAN(36)Value provided by the merchant in the Request-Reference-No parameter of the Create Payment request
amount REQUIREDobjectAn object for the base transaction amount
amount.currency REQUIREDstringISO 4217 Alpha-3 Currency code of the amount
amount.value REQUIREDfloat0.001 to 9999999999.99Transaction amount in the exponent/decimal notation of the provided currency
fee REQUIREDobjectAn object for the base fee amount
fee.currency REQUIREDstringISO 4217 Alpha-3 Currency code of the fee
fee.value REQUIREDfloat0.001 to 9999999999.99Fee amount in the exponent/decimal notation of the provided currency